From 9f0c6c247f174dff0b9af57e61274a808b1acf09 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 30 Apr 2024 20:04:41 +0000 Subject: [PATCH] feat: Support for the AcquireSsrsLease and ReleaseSsrsLease RPCs feat: Support for migration type and PostgreSQL parallel level in the VerifyExternalSyncSettings call feat: Support for setting the migration type when starting an external sync feat: Support for additional error types in external sync settings feat: DatabaseInstance resource now includes disaster recovery replica information and Gemini configuration feat: BackupConfiguration resource now includes transactional log storage location feat: ImportContext now includes options for importing data from SQL statements feat: Operation resource now includes context for acquire SSRS lease operations feat: Support for additional SQL operations related to SSRS leases and old primary reconfiguration feat: Databsae instance settings now includes a flag to enable Vertex AI integration feat: Support for several newer releases of MySQL 8.0 docs: Note that `ssl_mode` is now used by all databases including SQL Server PiperOrigin-RevId: 629471589 Source-Link: https://github.com/googleapis/googleapis/commit/b63fdfa0b1d548a3603f86eeab8e770a6da797df Source-Link: https://github.com/googleapis/googleapis-gen/commit/8f51198cada87fdaef808ded8035b3078421138c Copy-Tag: eyJwIjoiU3FsQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjhmNTExOThjYWRhODdmZGFlZjgwOGRlZDgwMzViMzA3ODQyMTEzOGMifQ== --- .../V1/CloudSqlAvailableDatabaseVersions.php | 31 + .../Cloud/Sql/V1/CloudSqlBackupRuns.php | Bin 0 -> 3527 bytes .../Google/Cloud/Sql/V1/CloudSqlConnect.php | 59 + .../Google/Cloud/Sql/V1/CloudSqlDatabases.php | 60 + .../Google/Cloud/Sql/V1/CloudSqlEvents.php | 31 + .../Google/Cloud/Sql/V1/CloudSqlFlags.php | Bin 0 -> 1992 bytes .../Cloud/Sql/V1/CloudSqlIamPolicies.php | 30 + .../Cloud/Sql/V1/CloudSqlInstanceNames.php | 31 + .../Google/Cloud/Sql/V1/CloudSqlInstances.php | Bin 0 -> 22017 bytes .../Cloud/Sql/V1/CloudSqlOperations.php | 52 + .../Google/Cloud/Sql/V1/CloudSqlRegions.php | 31 + .../Google/Cloud/Sql/V1/CloudSqlResources.php | Bin 0 -> 15132 bytes .../Google/Cloud/Sql/V1/CloudSqlSslCerts.php | 60 + .../Google/Cloud/Sql/V1/CloudSqlTiers.php | 43 + .../Google/Cloud/Sql/V1/CloudSqlUsers.php | Bin 0 -> 3866 bytes .../src/Google/Cloud/Sql/V1/AclEntry.php | 187 ++ .../Cloud/Sql/V1/AcquireSsrsLeaseContext.php | 217 ++ .../Cloud/Sql/V1/AdvancedMachineFeatures.php | 67 + .../src/Google/Cloud/Sql/V1/ApiWarning.php | 135 + .../Sql/V1/ApiWarning/SqlApiWarningCode.php | 80 + .../Cloud/Sql/V1/BackupConfiguration.php | 598 ++++ .../TransactionalLogStorageState.php | 81 + .../src/Google/Cloud/Sql/V1/BackupContext.php | 101 + .../Cloud/Sql/V1/BackupReencryptionConfig.php | 121 + .../BackupReencryptionConfig/BackupType.php | 64 + .../Cloud/Sql/V1/BackupRetentionSettings.php | 151 + .../BackupRetentionSettings/RetentionUnit.php | 57 + .../src/Google/Cloud/Sql/V1/BackupRun.php | 733 +++++ .../Cloud/Sql/V1/BackupRunsListResponse.php | 139 + .../proto/src/Google/Cloud/Sql/V1/BakType.php | 66 + .../Google/Cloud/Sql/V1/BinLogCoordinates.php | 135 + .../src/Google/Cloud/Sql/V1/CloneContext.php | 383 +++ .../Google/Cloud/Sql/V1/ConnectSettings.php | 371 +++ .../Google/Cloud/Sql/V1/DataCacheConfig.php | 67 + .../src/Google/Cloud/Sql/V1/Database.php | 354 +++ .../src/Google/Cloud/Sql/V1/DatabaseFlags.php | 125 + .../Google/Cloud/Sql/V1/DatabaseInstance.php | 1965 +++++++++++++ .../DatabaseInstance/SqlFailoverReplica.php | 159 ++ .../V1/DatabaseInstance/SqlInstanceState.php | 100 + .../SqlNetworkArchitecture.php | 62 + .../DatabaseInstance/SqlOutOfDiskReport.php | 160 ++ .../SqlOutOfDiskReport/SqlOutOfDiskState.php | 65 + .../SqlScheduledMaintenance.php | 190 ++ .../Cloud/Sql/V1/DatabasesListResponse.php | 101 + .../src/Google/Cloud/Sql/V1/DemoteContext.php | 106 + .../Sql/V1/DemoteMasterConfiguration.php | 132 + .../Cloud/Sql/V1/DemoteMasterContext.php | 294 ++ .../DemoteMasterMySqlReplicaConfiguration.php | 245 ++ .../Cloud/Sql/V1/DenyMaintenancePeriod.php | 164 ++ .../Sql/V1/DiskEncryptionConfiguration.php | 101 + .../Cloud/Sql/V1/DiskEncryptionStatus.php | 101 + .../src/Google/Cloud/Sql/V1/ExportContext.php | 436 +++ .../V1/ExportContext/SqlBakExportOptions.php | 380 +++ .../V1/ExportContext/SqlCsvExportOptions.php | 216 ++ .../Sql/V1/ExportContext/SqlExportOptions.php | 326 +++ .../SqlExportOptions/MysqlExportOptions.php | 137 + .../Sql/V1/ExternalSyncParallelLevel.php | 68 + .../Google/Cloud/Sql/V1/FailoverContext.php | 105 + .../v1/proto/src/Google/Cloud/Sql/V1/Flag.php | 579 ++++ .../Google/Cloud/Sql/V1/FlagsListResponse.php | 101 + .../Cloud/Sql/V1/GeminiInstanceConfig.php | 297 ++ .../Sql/V1/GenerateEphemeralCertRequest.php | 261 ++ .../Sql/V1/GenerateEphemeralCertResponse.php | 77 + .../Sql/V1/GetConnectSettingsRequest.php | 149 + .../src/Google/Cloud/Sql/V1/ImportContext.php | 363 +++ .../V1/ImportContext/SqlBakImportOptions.php | 452 +++ .../SqlBakImportOptions/EncryptionOptions.php | 152 + .../V1/ImportContext/SqlCsvImportOptions.php | 254 ++ .../Sql/V1/ImportContext/SqlImportOptions.php | 176 ++ .../Google/Cloud/Sql/V1/InsightsConfig.php | 306 ++ .../Google/Cloud/Sql/V1/InstanceReference.php | 143 + .../V1/InstancesAcquireSsrsLeaseRequest.php | 77 + .../Cloud/Sql/V1/InstancesCloneRequest.php | 77 + .../Sql/V1/InstancesDemoteMasterRequest.php | 77 + .../Cloud/Sql/V1/InstancesDemoteRequest.php | 78 + .../Cloud/Sql/V1/InstancesExportRequest.php | 77 + .../Cloud/Sql/V1/InstancesFailoverRequest.php | 77 + .../Cloud/Sql/V1/InstancesImportRequest.php | 77 + .../Cloud/Sql/V1/InstancesListResponse.php | 173 ++ .../Sql/V1/InstancesListServerCasResponse.php | 128 + .../Sql/V1/InstancesReencryptRequest.php | 77 + .../Sql/V1/InstancesRestoreBackupRequest.php | 77 + .../Sql/V1/InstancesRotateServerCaRequest.php | 77 + .../Sql/V1/InstancesTruncateLogRequest.php | 77 + .../Google/Cloud/Sql/V1/IpConfiguration.php | 574 ++++ .../Cloud/Sql/V1/IpConfiguration/SslMode.php | 86 + .../src/Google/Cloud/Sql/V1/IpMapping.php | 169 ++ .../Cloud/Sql/V1/LocationPreference.php | 193 ++ .../Google/Cloud/Sql/V1/MaintenanceWindow.php | 252 ++ .../Sql/V1/MySqlReplicaConfiguration.php | 548 ++++ .../Google/Cloud/Sql/V1/MySqlSyncConfig.php | 67 + .../Cloud/Sql/V1/OnPremisesConfiguration.php | 353 +++ .../src/Google/Cloud/Sql/V1/Operation.php | 814 ++++++ .../Sql/V1/Operation/SqlOperationStatus.php | 71 + .../Sql/V1/Operation/SqlOperationType.php | 342 +++ .../Google/Cloud/Sql/V1/OperationError.php | 135 + .../Google/Cloud/Sql/V1/OperationErrors.php | 101 + .../Cloud/Sql/V1/OperationsListResponse.php | 139 + .../Google/Cloud/Sql/V1/PasswordStatus.php | 111 + .../Cloud/Sql/V1/PasswordValidationPolicy.php | 484 ++++ .../PasswordValidationPolicy/Complexity.php | 58 + .../Cloud/Sql/V1/PerformDiskShrinkContext.php | 67 + .../src/Google/Cloud/Sql/V1/PscConfig.php | 127 + .../Cloud/Sql/V1/ReplicaConfiguration.php | 309 +++ .../Cloud/Sql/V1/ReplicationCluster.php | 125 + .../Cloud/Sql/V1/RestoreBackupContext.php | 170 ++ .../Cloud/Sql/V1/RotateServerCaContext.php | 105 + .../src/Google/Cloud/Sql/V1/Settings.php | 1773 ++++++++++++ .../Sql/V1/Settings/ConnectorEnforcement.php | 66 + .../Google/Cloud/Sql/V1/Settings/Edition.php | 64 + .../Sql/V1/Settings/SqlActivationPolicy.php | 71 + .../Cloud/Sql/V1/SqlActiveDirectoryConfig.php | 101 + .../Cloud/Sql/V1/SqlAvailabilityType.php | 61 + .../Google/Cloud/Sql/V1/SqlBackendType.php | 66 + .../src/Google/Cloud/Sql/V1/SqlBackupKind.php | 61 + .../Cloud/Sql/V1/SqlBackupRunStatus.php | 113 + .../Google/Cloud/Sql/V1/SqlBackupRunType.php | 61 + .../Sql/V1/SqlBackupRunsDeleteRequest.php | 143 + .../Cloud/Sql/V1/SqlBackupRunsGetRequest.php | 135 + .../Sql/V1/SqlBackupRunsInsertRequest.php | 138 + .../Cloud/Sql/V1/SqlBackupRunsListRequest.php | 177 ++ .../Google/Cloud/Sql/V1/SqlDataDiskType.php | 69 + .../Cloud/Sql/V1/SqlDatabaseVersion.php | 327 +++ .../Sql/V1/SqlDatabasesDeleteRequest.php | 135 + .../Cloud/Sql/V1/SqlDatabasesGetRequest.php | 135 + .../Sql/V1/SqlDatabasesInsertRequest.php | 138 + .../Cloud/Sql/V1/SqlDatabasesListRequest.php | 101 + .../Sql/V1/SqlDatabasesUpdateRequest.php | 172 ++ .../Sql/V1/SqlExternalSyncSettingError.php | 139 + .../SqlExternalSyncSettingErrorType.php | 360 +++ .../src/Google/Cloud/Sql/V1/SqlFileType.php | 64 + .../src/Google/Cloud/Sql/V1/SqlFlagType.php | 95 + .../Cloud/Sql/V1/SqlFlagsListRequest.php | 71 + .../Google/Cloud/Sql/V1/SqlInstanceType.php | 68 + .../SqlInstancesAcquireSsrsLeaseRequest.php | 161 ++ .../SqlInstancesAcquireSsrsLeaseResponse.php | 67 + .../Sql/V1/SqlInstancesAddServerCaRequest.php | 101 + .../Cloud/Sql/V1/SqlInstancesCloneRequest.php | 142 + ...SqlInstancesCreateEphemeralCertRequest.php | 138 + .../Sql/V1/SqlInstancesDeleteRequest.php | 101 + .../V1/SqlInstancesDemoteMasterRequest.php | 138 + .../Sql/V1/SqlInstancesDemoteRequest.php | 145 + .../Sql/V1/SqlInstancesExportRequest.php | 138 + .../Sql/V1/SqlInstancesFailoverRequest.php | 138 + ...SqlInstancesGetDiskShrinkConfigRequest.php | 101 + ...qlInstancesGetDiskShrinkConfigResponse.php | 135 + ...lInstancesGetLatestRecoveryTimeRequest.php | 101 + ...InstancesGetLatestRecoveryTimeResponse.php | 111 + .../Cloud/Sql/V1/SqlInstancesGetRequest.php | 101 + .../Sql/V1/SqlInstancesImportRequest.php | 138 + .../Sql/V1/SqlInstancesInsertRequest.php | 108 + .../Cloud/Sql/V1/SqlInstancesListRequest.php | 213 ++ .../V1/SqlInstancesListServerCasRequest.php | 101 + .../Cloud/Sql/V1/SqlInstancesPatchRequest.php | 138 + .../SqlInstancesPerformDiskShrinkRequest.php | 145 + .../V1/SqlInstancesPromoteReplicaRequest.php | 143 + .../Sql/V1/SqlInstancesReencryptRequest.php | 145 + .../SqlInstancesReleaseSsrsLeaseRequest.php | 113 + .../SqlInstancesReleaseSsrsLeaseResponse.php | 67 + ...lInstancesRescheduleMaintenanceRequest.php | 138 + ...tancesRescheduleMaintenanceRequestBody.php | 77 + .../Reschedule.php | 124 + .../RescheduleType.php | 68 + .../SqlInstancesResetReplicaSizeRequest.php | 101 + .../V1/SqlInstancesResetSslConfigRequest.php | 101 + .../Sql/V1/SqlInstancesRestartRequest.php | 101 + .../V1/SqlInstancesRestoreBackupRequest.php | 138 + .../V1/SqlInstancesRotateServerCaRequest.php | 138 + .../SqlInstancesStartExternalSyncRequest.php | 287 ++ .../V1/SqlInstancesStartReplicaRequest.php | 101 + .../Sql/V1/SqlInstancesStopReplicaRequest.php | 101 + .../Sql/V1/SqlInstancesSwitchoverRequest.php | 153 + .../Sql/V1/SqlInstancesTruncateLogRequest.php | 138 + .../Sql/V1/SqlInstancesUpdateRequest.php | 138 + ...ancesVerifyExternalSyncSettingsRequest.php | 321 +++ .../ExternalSyncMode.php | 64 + .../MigrationType.php | 65 + ...ncesVerifyExternalSyncSettingsResponse.php | 135 + .../Google/Cloud/Sql/V1/SqlIpAddressType.php | 83 + .../Sql/V1/SqlOperationsCancelRequest.php | 101 + .../Cloud/Sql/V1/SqlOperationsGetRequest.php | 101 + .../Cloud/Sql/V1/SqlOperationsListRequest.php | 173 ++ .../Google/Cloud/Sql/V1/SqlPricingPlan.php | 61 + .../Cloud/Sql/V1/SqlReplicationType.php | 63 + .../Cloud/Sql/V1/SqlServerAuditConfig.php | 189 ++ .../Cloud/Sql/V1/SqlServerDatabaseDetails.php | 101 + .../Cloud/Sql/V1/SqlServerUserDetails.php | 101 + .../Cloud/Sql/V1/SqlSslCertsDeleteRequest.php | 133 + .../Cloud/Sql/V1/SqlSslCertsGetRequest.php | 133 + .../Cloud/Sql/V1/SqlSslCertsInsertRequest.php | 136 + .../Cloud/Sql/V1/SqlSslCertsListRequest.php | 99 + .../Cloud/Sql/V1/SqlSuspensionReason.php | 78 + .../Cloud/Sql/V1/SqlTiersListRequest.php | 67 + .../Google/Cloud/Sql/V1/SqlUpdateTrack.php | 73 + .../Cloud/Sql/V1/SqlUsersDeleteRequest.php | 167 ++ .../Cloud/Sql/V1/SqlUsersGetRequest.php | 169 ++ .../Cloud/Sql/V1/SqlUsersInsertRequest.php | 136 + .../Cloud/Sql/V1/SqlUsersListRequest.php | 99 + .../Cloud/Sql/V1/SqlUsersUpdateRequest.php | 204 ++ .../proto/src/Google/Cloud/Sql/V1/SslCert.php | 375 +++ .../src/Google/Cloud/Sql/V1/SslCertDetail.php | 115 + .../Sql/V1/SslCertsCreateEphemeralRequest.php | 101 + .../Cloud/Sql/V1/SslCertsInsertRequest.php | 71 + .../Cloud/Sql/V1/SslCertsInsertResponse.php | 207 ++ .../Cloud/Sql/V1/SslCertsListResponse.php | 101 + .../src/Google/Cloud/Sql/V1/SyncFlags.php | 106 + .../v1/proto/src/Google/Cloud/Sql/V1/Tier.php | 207 ++ .../Google/Cloud/Sql/V1/TiersListResponse.php | 101 + .../Cloud/Sql/V1/TruncateLogContext.php | 105 + .../v1/proto/src/Google/Cloud/Sql/V1/User.php | 474 ++++ .../Cloud/Sql/V1/User/DualPasswordType.php | 71 + .../Google/Cloud/Sql/V1/User/SqlUserType.php | 85 + .../Sql/V1/UserPasswordValidationPolicy.php | 227 ++ .../Google/Cloud/Sql/V1/UsersListResponse.php | 140 + .../V1/SqlBackupRunsServiceClient/delete.php | 57 + .../V1/SqlBackupRunsServiceClient/get.php | 57 + .../V1/SqlBackupRunsServiceClient/insert.php | 57 + .../V1/SqlBackupRunsServiceClient/list.php | 59 + .../generate_ephemeral_cert.php | 60 + .../get_connect_settings.php | 57 + .../V1/SqlDatabasesServiceClient/delete.php | 57 + .../V1/SqlDatabasesServiceClient/get.php | 58 + .../V1/SqlDatabasesServiceClient/insert.php | 60 + .../V1/SqlDatabasesServiceClient/list.php | 57 + .../V1/SqlDatabasesServiceClient/patch.php | 58 + .../V1/SqlDatabasesServiceClient/update.php | 58 + .../samples/V1/SqlFlagsServiceClient/list.php | 57 + .../acquire_ssrs_lease.php | 80 + .../add_server_ca.php | 61 + .../V1/SqlInstancesServiceClient/clone.php | 58 + .../create_ephemeral.php | 60 + .../V1/SqlInstancesServiceClient/delete.php | 57 + .../V1/SqlInstancesServiceClient/demote.php | 87 + .../demote_master.php | 58 + .../V1/SqlInstancesServiceClient/export.php | 58 + .../V1/SqlInstancesServiceClient/failover.php | 64 + .../V1/SqlInstancesServiceClient/get.php | 57 + .../get_disk_shrink_config.php | 57 + .../get_latest_recovery_time.php | 57 + .../V1/SqlInstancesServiceClient/import.php | 58 + .../V1/SqlInstancesServiceClient/insert.php | 57 + .../V1/SqlInstancesServiceClient/list.php | 57 + .../list_server_cas.php | 61 + .../V1/SqlInstancesServiceClient/patch.php | 58 + .../perform_disk_shrink.php | 57 + .../promote_replica.php | 58 + .../SqlInstancesServiceClient/reencrypt.php | 57 + .../release_ssrs_lease.php | 76 + .../reschedule_maintenance.php | 57 + .../reset_replica_size.php | 57 + .../reset_ssl_config.php | 58 + .../V1/SqlInstancesServiceClient/restart.php | 57 + .../restore_backup.php | 58 + .../rotate_server_ca.php | 58 + .../start_external_sync.php | 57 + .../start_replica.php | 57 + .../stop_replica.php | 57 + .../SqlInstancesServiceClient/switchover.php | 57 + .../truncate_log.php | 58 + .../V1/SqlInstancesServiceClient/update.php | 58 + .../verify_external_sync_settings.php | 57 + .../V1/SqlOperationsServiceClient/cancel.php | 55 + .../V1/SqlOperationsServiceClient/get.php | 57 + .../V1/SqlOperationsServiceClient/list.php | 58 + .../V1/SqlSslCertsServiceClient/delete.php | 58 + .../V1/SqlSslCertsServiceClient/get.php | 59 + .../V1/SqlSslCertsServiceClient/insert.php | 59 + .../V1/SqlSslCertsServiceClient/list.php | 57 + .../samples/V1/SqlTiersServiceClient/list.php | 59 + .../V1/SqlUsersServiceClient/delete.php | 57 + .../samples/V1/SqlUsersServiceClient/get.php | 57 + .../V1/SqlUsersServiceClient/insert.php | 57 + .../samples/V1/SqlUsersServiceClient/list.php | 57 + .../V1/SqlUsersServiceClient/update.php | 57 + ...AvailableDatabaseVersionsServiceClient.php | 144 + .../V1/Client/SqlBackupRunsServiceClient.php | 278 ++ .../src/V1/Client/SqlConnectServiceClient.php | 223 ++ .../V1/Client/SqlDatabasesServiceClient.php | 337 +++ .../src/V1/Client/SqlEventsServiceClient.php | 144 + .../src/V1/Client/SqlFlagsServiceClient.php | 190 ++ .../V1/Client/SqlIamPoliciesServiceClient.php | 143 + .../Client/SqlInstanceNamesServiceClient.php | 143 + .../V1/Client/SqlInstancesServiceClient.php | 1159 ++++++++ .../V1/Client/SqlOperationsServiceClient.php | 246 ++ .../src/V1/Client/SqlRegionsServiceClient.php | 144 + .../V1/Client/SqlSslCertsServiceClient.php | 282 ++ .../src/V1/Client/SqlTiersServiceClient.php | 192 ++ .../src/V1/Client/SqlUsersServiceClient.php | 304 ++ .../SqlAdmin/v1/src/V1/gapic_metadata.json | 425 +++ ...tabase_versions_service_client_config.json | 31 + ...ase_versions_service_descriptor_config.php | 27 + ...se_versions_service_rest_client_config.php | 26 + ...sql_backup_runs_service_client_config.json | 52 + ..._backup_runs_service_descriptor_config.php | 112 + ...backup_runs_service_rest_client_config.php | 104 + .../sql_connect_service_client_config.json | 32 + .../sql_connect_service_descriptor_config.php | 64 + ...sql_connect_service_rest_client_config.php | 62 + .../sql_databases_service_client_config.json | 62 + ...ql_databases_service_descriptor_config.php | 160 ++ ...l_databases_service_rest_client_config.php | 148 + .../sql_events_service_client_config.json | 31 + .../sql_events_service_descriptor_config.php | 27 + .../sql_events_service_rest_client_config.php | 26 + .../sql_flags_service_client_config.json | 37 + .../sql_flags_service_descriptor_config.php | 32 + .../sql_flags_service_rest_client_config.php | 33 + ...ql_iam_policies_service_client_config.json | 21 + ...iam_policies_service_descriptor_config.php | 27 + ...am_policies_service_rest_client_config.php | 26 + ..._instance_names_service_client_config.json | 21 + ...stance_names_service_descriptor_config.php | 27 + ...tance_names_service_rest_client_config.php | 26 + .../sql_instances_service_client_config.json | 202 ++ ...ql_instances_service_descriptor_config.php | 628 +++++ ...l_instances_service_rest_client_config.php | 583 ++++ .../sql_operations_service_client_config.json | 47 + ...l_operations_service_descriptor_config.php | 76 + ..._operations_service_rest_client_config.php | 72 + .../sql_regions_service_client_config.json | 21 + .../sql_regions_service_descriptor_config.php | 27 + ...sql_regions_service_rest_client_config.php | 26 + .../sql_ssl_certs_service_client_config.json | 52 + ...ql_ssl_certs_service_descriptor_config.php | 112 + ...l_ssl_certs_service_rest_client_config.php | 104 + .../sql_tiers_service_client_config.json | 37 + .../sql_tiers_service_descriptor_config.php | 40 + .../sql_tiers_service_rest_client_config.php | 40 + .../sql_users_service_client_config.json | 57 + .../sql_users_service_descriptor_config.php | 124 + .../sql_users_service_rest_client_config.php | 116 + ...lableDatabaseVersionsServiceClientTest.php | 56 + .../Client/SqlBackupRunsServiceClientTest.php | 365 +++ .../V1/Client/SqlConnectServiceClientTest.php | 202 ++ .../Client/SqlDatabasesServiceClientTest.php | 502 ++++ .../V1/Client/SqlEventsServiceClientTest.php | 56 + .../V1/Client/SqlFlagsServiceClientTest.php | 142 + .../SqlIamPoliciesServiceClientTest.php | 56 + .../SqlInstanceNamesServiceClientTest.php | 56 + .../Client/SqlInstancesServiceClientTest.php | 2466 +++++++++++++++++ .../Client/SqlOperationsServiceClientTest.php | 266 ++ .../V1/Client/SqlRegionsServiceClientTest.php | 56 + .../Client/SqlSslCertsServiceClientTest.php | 352 +++ .../V1/Client/SqlTiersServiceClientTest.php | 142 + .../V1/Client/SqlUsersServiceClientTest.php | 434 +++ .../Google/Cloud/Sql/V1Beta4/CloudSql.php | Bin 0 -> 18990 bytes .../Cloud/Sql/V1Beta4/CloudSqlConnect.php | 59 + .../Cloud/Sql/V1Beta4/CloudSqlIamPolicies.php | 30 + .../Cloud/Sql/V1Beta4/CloudSqlResources.php | Bin 0 -> 27392 bytes .../Cloud/Sql/V1Beta4/CloudSqlTiers.php | 43 + .../Cloud/Sql/V1Beta4/CloudSqlUsers.php | Bin 0 -> 4038 bytes .../src/Google/Cloud/Sql/V1beta4/AclEntry.php | 187 ++ .../Sql/V1beta4/AcquireSsrsLeaseContext.php | 217 ++ .../Sql/V1beta4/AdvancedMachineFeatures.php | 67 + .../Google/Cloud/Sql/V1beta4/ApiWarning.php | 135 + .../V1beta4/ApiWarning/SqlApiWarningCode.php | 80 + .../Cloud/Sql/V1beta4/BackupConfiguration.php | 598 ++++ .../TransactionalLogStorageState.php | 81 + .../Cloud/Sql/V1beta4/BackupContext.php | 101 + .../Sql/V1beta4/BackupReencryptionConfig.php | 121 + .../BackupReencryptionConfig/BackupType.php | 64 + .../Sql/V1beta4/BackupRetentionSettings.php | 151 + .../BackupRetentionSettings/RetentionUnit.php | 57 + .../Google/Cloud/Sql/V1beta4/BackupRun.php | 733 +++++ .../Sql/V1beta4/BackupRunsListResponse.php | 139 + .../src/Google/Cloud/Sql/V1beta4/BakType.php | 66 + .../Cloud/Sql/V1beta4/BinLogCoordinates.php | 135 + .../Google/Cloud/Sql/V1beta4/CloneContext.php | 383 +++ .../Cloud/Sql/V1beta4/ConnectSettings.php | 371 +++ .../Cloud/Sql/V1beta4/DataCacheConfig.php | 67 + .../src/Google/Cloud/Sql/V1beta4/Database.php | 354 +++ .../Cloud/Sql/V1beta4/DatabaseFlags.php | 125 + .../Cloud/Sql/V1beta4/DatabaseInstance.php | 1976 +++++++++++++ .../DatabaseInstance/SqlFailoverReplica.php | 159 ++ .../DatabaseInstance/SqlInstanceState.php | 100 + .../SqlNetworkArchitecture.php | 62 + .../DatabaseInstance/SqlOutOfDiskReport.php | 160 ++ .../SqlOutOfDiskReport/SqlOutOfDiskState.php | 65 + .../SqlScheduledMaintenance.php | 190 ++ .../Sql/V1beta4/DatabasesListResponse.php | 101 + .../Cloud/Sql/V1beta4/DemoteContext.php | 106 + .../Sql/V1beta4/DemoteMasterConfiguration.php | 132 + .../Cloud/Sql/V1beta4/DemoteMasterContext.php | 294 ++ .../DemoteMasterMySqlReplicaConfiguration.php | 245 ++ .../Sql/V1beta4/DenyMaintenancePeriod.php | 164 ++ .../V1beta4/DiskEncryptionConfiguration.php | 101 + .../Sql/V1beta4/DiskEncryptionStatus.php | 101 + .../Cloud/Sql/V1beta4/ExportContext.php | 436 +++ .../ExportContext/SqlBakExportOptions.php | 380 +++ .../ExportContext/SqlCsvExportOptions.php | 216 ++ .../ExportContext/SqlExportOptions.php | 326 +++ .../SqlExportOptions/MysqlExportOptions.php | 137 + .../Sql/V1beta4/ExternalSyncParallelLevel.php | 68 + .../Cloud/Sql/V1beta4/FailoverContext.php | 105 + .../src/Google/Cloud/Sql/V1beta4/Flag.php | 579 ++++ .../Cloud/Sql/V1beta4/FlagsListResponse.php | 101 + .../Sql/V1beta4/GeminiInstanceConfig.php | 297 ++ .../V1beta4/GenerateEphemeralCertRequest.php | 261 ++ .../V1beta4/GenerateEphemeralCertResponse.php | 77 + .../Sql/V1beta4/GetConnectSettingsRequest.php | 149 + .../Cloud/Sql/V1beta4/ImportContext.php | 371 +++ .../ImportContext/SqlBakImportOptions.php | 452 +++ .../SqlBakImportOptions/EncryptionOptions.php | 152 + .../ImportContext/SqlCsvImportOptions.php | 254 ++ .../ImportContext/SqlImportOptions.php | 176 ++ .../Cloud/Sql/V1beta4/InsightsConfig.php | 306 ++ .../Cloud/Sql/V1beta4/InstanceReference.php | 143 + .../InstancesAcquireSsrsLeaseRequest.php | 77 + .../Sql/V1beta4/InstancesCloneRequest.php | 77 + .../V1beta4/InstancesDemoteMasterRequest.php | 77 + .../Sql/V1beta4/InstancesDemoteRequest.php | 82 + .../Sql/V1beta4/InstancesExportRequest.php | 77 + .../Sql/V1beta4/InstancesFailoverRequest.php | 77 + .../Sql/V1beta4/InstancesImportRequest.php | 77 + .../Sql/V1beta4/InstancesListResponse.php | 173 ++ .../InstancesListServerCasResponse.php | 128 + .../Sql/V1beta4/InstancesReencryptRequest.php | 77 + .../V1beta4/InstancesRestoreBackupRequest.php | 77 + .../InstancesRotateServerCaRequest.php | 77 + .../V1beta4/InstancesTruncateLogRequest.php | 77 + .../Cloud/Sql/V1beta4/IpConfiguration.php | 574 ++++ .../Sql/V1beta4/IpConfiguration/SslMode.php | 87 + .../Google/Cloud/Sql/V1beta4/IpMapping.php | 169 ++ .../Cloud/Sql/V1beta4/LocationPreference.php | 193 ++ .../Cloud/Sql/V1beta4/MaintenanceWindow.php | 252 ++ .../Sql/V1beta4/MySqlReplicaConfiguration.php | 548 ++++ .../Cloud/Sql/V1beta4/MySqlSyncConfig.php | 67 + .../Sql/V1beta4/OnPremisesConfiguration.php | 353 +++ .../Google/Cloud/Sql/V1beta4/Operation.php | 814 ++++++ .../V1beta4/Operation/SqlOperationStatus.php | 71 + .../V1beta4/Operation/SqlOperationType.php | 342 +++ .../Cloud/Sql/V1beta4/OperationError.php | 135 + .../Cloud/Sql/V1beta4/OperationErrors.php | 101 + .../Sql/V1beta4/OperationsListResponse.php | 139 + .../Cloud/Sql/V1beta4/PasswordStatus.php | 111 + .../Sql/V1beta4/PasswordValidationPolicy.php | 484 ++++ .../PasswordValidationPolicy/Complexity.php | 58 + .../Sql/V1beta4/PerformDiskShrinkContext.php | 67 + .../Google/Cloud/Sql/V1beta4/PscConfig.php | 127 + .../Sql/V1beta4/ReplicaConfiguration.php | 309 +++ .../Cloud/Sql/V1beta4/ReplicationCluster.php | 145 + .../Sql/V1beta4/RestoreBackupContext.php | 170 ++ .../Sql/V1beta4/RotateServerCaContext.php | 105 + .../src/Google/Cloud/Sql/V1beta4/Settings.php | 1773 ++++++++++++ .../V1beta4/Settings/ConnectorEnforcement.php | 66 + .../Cloud/Sql/V1beta4/Settings/Edition.php | 64 + .../V1beta4/Settings/SqlActivationPolicy.php | 71 + .../Sql/V1beta4/SqlActiveDirectoryConfig.php | 101 + .../Cloud/Sql/V1beta4/SqlAvailabilityType.php | 61 + .../Cloud/Sql/V1beta4/SqlBackendType.php | 66 + .../Cloud/Sql/V1beta4/SqlBackupKind.php | 61 + .../Cloud/Sql/V1beta4/SqlBackupRunStatus.php | 113 + .../Cloud/Sql/V1beta4/SqlBackupRunType.php | 59 + .../V1beta4/SqlBackupRunsDeleteRequest.php | 141 + .../Sql/V1beta4/SqlBackupRunsGetRequest.php | 133 + .../V1beta4/SqlBackupRunsInsertRequest.php | 136 + .../Sql/V1beta4/SqlBackupRunsListRequest.php | 175 ++ .../Cloud/Sql/V1beta4/SqlDataDiskType.php | 69 + .../Cloud/Sql/V1beta4/SqlDatabaseVersion.php | 327 +++ .../Sql/V1beta4/SqlDatabasesDeleteRequest.php | 133 + .../Sql/V1beta4/SqlDatabasesGetRequest.php | 133 + .../Sql/V1beta4/SqlDatabasesInsertRequest.php | 136 + .../Sql/V1beta4/SqlDatabasesListRequest.php | 99 + .../Sql/V1beta4/SqlDatabasesUpdateRequest.php | 170 ++ .../V1beta4/SqlExternalSyncSettingError.php | 139 + .../SqlExternalSyncSettingErrorType.php | 360 +++ .../Google/Cloud/Sql/V1beta4/SqlFileType.php | 64 + .../Google/Cloud/Sql/V1beta4/SqlFlagType.php | 95 + .../Cloud/Sql/V1beta4/SqlFlagsListRequest.php | 69 + .../Cloud/Sql/V1beta4/SqlInstanceType.php | 68 + .../SqlInstancesAcquireSsrsLeaseRequest.php | 161 ++ .../SqlInstancesAcquireSsrsLeaseResponse.php | 77 + .../SqlInstancesAddServerCaRequest.php | 99 + .../Sql/V1beta4/SqlInstancesCloneRequest.php | 140 + ...SqlInstancesCreateEphemeralCertRequest.php | 136 + .../Sql/V1beta4/SqlInstancesDeleteRequest.php | 99 + .../SqlInstancesDemoteMasterRequest.php | 136 + .../Sql/V1beta4/SqlInstancesDemoteRequest.php | 145 + .../Sql/V1beta4/SqlInstancesExportRequest.php | 136 + .../V1beta4/SqlInstancesFailoverRequest.php | 136 + ...SqlInstancesGetDiskShrinkConfigRequest.php | 101 + ...qlInstancesGetDiskShrinkConfigResponse.php | 135 + ...lInstancesGetLatestRecoveryTimeRequest.php | 101 + ...InstancesGetLatestRecoveryTimeResponse.php | 111 + .../Sql/V1beta4/SqlInstancesGetRequest.php | 99 + .../Sql/V1beta4/SqlInstancesImportRequest.php | 136 + .../Sql/V1beta4/SqlInstancesInsertRequest.php | 106 + .../Sql/V1beta4/SqlInstancesListRequest.php | 211 ++ .../SqlInstancesListServerCasRequest.php | 99 + .../Sql/V1beta4/SqlInstancesPatchRequest.php | 136 + .../SqlInstancesPerformDiskShrinkRequest.php | 145 + .../SqlInstancesPromoteReplicaRequest.php | 141 + .../V1beta4/SqlInstancesReencryptRequest.php | 145 + .../SqlInstancesReleaseSsrsLeaseRequest.php | 117 + .../SqlInstancesReleaseSsrsLeaseResponse.php | 67 + ...lInstancesRescheduleMaintenanceRequest.php | 136 + ...tancesRescheduleMaintenanceRequestBody.php | 77 + .../Reschedule.php | 124 + .../RescheduleType.php | 68 + .../SqlInstancesResetReplicaSizeRequest.php | 101 + .../SqlInstancesResetSslConfigRequest.php | 99 + .../V1beta4/SqlInstancesRestartRequest.php | 99 + .../SqlInstancesRestoreBackupRequest.php | 136 + .../SqlInstancesRotateServerCaRequest.php | 136 + .../SqlInstancesStartExternalSyncRequest.php | 285 ++ .../SqlInstancesStartReplicaRequest.php | 99 + .../SqlInstancesStopReplicaRequest.php | 99 + .../V1beta4/SqlInstancesSwitchoverRequest.php | 153 + .../SqlInstancesTruncateLogRequest.php | 136 + .../Sql/V1beta4/SqlInstancesUpdateRequest.php | 136 + ...ancesVerifyExternalSyncSettingsRequest.php | 319 +++ .../ExternalSyncMode.php | 64 + .../MigrationType.php | 65 + ...ncesVerifyExternalSyncSettingsResponse.php | 135 + .../Cloud/Sql/V1beta4/SqlIpAddressType.php | 83 + .../V1beta4/SqlOperationsCancelRequest.php | 101 + .../Sql/V1beta4/SqlOperationsGetRequest.php | 99 + .../Sql/V1beta4/SqlOperationsListRequest.php | 171 ++ .../Cloud/Sql/V1beta4/SqlPricingPlan.php | 61 + .../Cloud/Sql/V1beta4/SqlReplicationType.php | 63 + .../Sql/V1beta4/SqlServerAuditConfig.php | 189 ++ .../Sql/V1beta4/SqlServerDatabaseDetails.php | 101 + .../Sql/V1beta4/SqlServerUserDetails.php | 101 + .../Sql/V1beta4/SqlSslCertsDeleteRequest.php | 133 + .../Sql/V1beta4/SqlSslCertsGetRequest.php | 133 + .../Sql/V1beta4/SqlSslCertsInsertRequest.php | 136 + .../Sql/V1beta4/SqlSslCertsListRequest.php | 99 + .../Cloud/Sql/V1beta4/SqlSuspensionReason.php | 78 + .../Cloud/Sql/V1beta4/SqlTiersListRequest.php | 65 + .../Cloud/Sql/V1beta4/SqlUpdateTrack.php | 73 + .../Sql/V1beta4/SqlUsersDeleteRequest.php | 167 ++ .../Cloud/Sql/V1beta4/SqlUsersGetRequest.php | 169 ++ .../Sql/V1beta4/SqlUsersInsertRequest.php | 136 + .../Cloud/Sql/V1beta4/SqlUsersListRequest.php | 99 + .../Sql/V1beta4/SqlUsersUpdateRequest.php | 204 ++ .../src/Google/Cloud/Sql/V1beta4/SslCert.php | 375 +++ .../Cloud/Sql/V1beta4/SslCertDetail.php | 115 + .../SslCertsCreateEphemeralRequest.php | 101 + .../Sql/V1beta4/SslCertsInsertRequest.php | 71 + .../Sql/V1beta4/SslCertsInsertResponse.php | 207 ++ .../Sql/V1beta4/SslCertsListResponse.php | 101 + .../Google/Cloud/Sql/V1beta4/SyncFlags.php | 106 + .../src/Google/Cloud/Sql/V1beta4/Tier.php | 207 ++ .../Cloud/Sql/V1beta4/TiersListResponse.php | 101 + .../Cloud/Sql/V1beta4/TruncateLogContext.php | 105 + .../src/Google/Cloud/Sql/V1beta4/User.php | 474 ++++ .../Sql/V1beta4/User/DualPasswordType.php | 71 + .../Cloud/Sql/V1beta4/User/SqlUserType.php | 85 + .../V1beta4/UserPasswordValidationPolicy.php | 227 ++ .../Cloud/Sql/V1beta4/UsersListResponse.php | 140 + .../SqlBackupRunsServiceClient/delete.php | 53 + .../SqlBackupRunsServiceClient/get.php | 53 + .../SqlBackupRunsServiceClient/insert.php | 53 + .../SqlBackupRunsServiceClient/list.php | 55 + .../generate_ephemeral_cert.php | 56 + .../get_connect_settings.php | 53 + .../SqlDatabasesServiceClient/delete.php | 53 + .../V1beta4/SqlDatabasesServiceClient/get.php | 54 + .../SqlDatabasesServiceClient/insert.php | 56 + .../SqlDatabasesServiceClient/list.php | 53 + .../SqlDatabasesServiceClient/patch.php | 54 + .../SqlDatabasesServiceClient/update.php | 54 + .../V1beta4/SqlFlagsServiceClient/list.php | 53 + .../acquire_ssrs_lease.php | 71 + .../add_server_ca.php | 57 + .../SqlInstancesServiceClient/clone.php | 54 + .../create_ephemeral.php | 56 + .../SqlInstancesServiceClient/delete.php | 53 + .../SqlInstancesServiceClient/demote.php | 68 + .../demote_master.php | 54 + .../SqlInstancesServiceClient/export.php | 54 + .../SqlInstancesServiceClient/failover.php | 60 + .../V1beta4/SqlInstancesServiceClient/get.php | 53 + .../get_disk_shrink_config.php | 53 + .../get_latest_recovery_time.php | 53 + .../SqlInstancesServiceClient/import.php | 54 + .../SqlInstancesServiceClient/insert.php | 53 + .../SqlInstancesServiceClient/list.php | 53 + .../list_server_cas.php | 57 + .../SqlInstancesServiceClient/patch.php | 54 + .../perform_disk_shrink.php | 53 + .../promote_replica.php | 54 + .../SqlInstancesServiceClient/reencrypt.php | 53 + .../release_ssrs_lease.php | 71 + .../reschedule_maintenance.php | 53 + .../reset_replica_size.php | 53 + .../reset_ssl_config.php | 54 + .../SqlInstancesServiceClient/restart.php | 53 + .../restore_backup.php | 54 + .../rotate_server_ca.php | 54 + .../start_external_sync.php | 53 + .../start_replica.php | 53 + .../stop_replica.php | 53 + .../SqlInstancesServiceClient/switchover.php | 53 + .../truncate_log.php | 54 + .../SqlInstancesServiceClient/update.php | 54 + .../verify_external_sync_settings.php | 53 + .../SqlOperationsServiceClient/cancel.php | 51 + .../SqlOperationsServiceClient/get.php | 53 + .../SqlOperationsServiceClient/list.php | 54 + .../SqlSslCertsServiceClient/delete.php | 54 + .../V1beta4/SqlSslCertsServiceClient/get.php | 55 + .../SqlSslCertsServiceClient/insert.php | 55 + .../V1beta4/SqlSslCertsServiceClient/list.php | 53 + .../V1beta4/SqlTiersServiceClient/list.php | 54 + .../V1beta4/SqlUsersServiceClient/delete.php | 53 + .../V1beta4/SqlUsersServiceClient/get.php | 53 + .../V1beta4/SqlUsersServiceClient/insert.php | 53 + .../V1beta4/SqlUsersServiceClient/list.php | 53 + .../V1beta4/SqlUsersServiceClient/update.php | 53 + .../Gapic/SqlBackupRunsServiceGapicClient.php | 414 +++ .../Gapic/SqlConnectServiceGapicClient.php | 309 +++ .../Gapic/SqlDatabasesServiceGapicClient.php | 529 ++++ .../Gapic/SqlFlagsServiceGapicClient.php | 208 ++ .../SqlIamPoliciesServiceGapicClient.php | 151 + .../Gapic/SqlInstancesServiceGapicClient.php | 2182 +++++++++++++++ .../Gapic/SqlOperationsServiceGapicClient.php | 336 +++ .../Gapic/SqlSslCertsServiceGapicClient.php | 403 +++ .../Gapic/SqlTiersServiceGapicClient.php | 213 ++ .../Gapic/SqlUsersServiceGapicClient.php | 476 ++++ .../V1beta4/SqlBackupRunsServiceClient.php | 36 + .../src/V1beta4/SqlConnectServiceClient.php | 36 + .../src/V1beta4/SqlDatabasesServiceClient.php | 36 + .../src/V1beta4/SqlFlagsServiceClient.php | 36 + .../V1beta4/SqlIamPoliciesServiceClient.php | 36 + .../src/V1beta4/SqlInstancesServiceClient.php | 36 + .../V1beta4/SqlOperationsServiceClient.php | 36 + .../src/V1beta4/SqlSslCertsServiceClient.php | 36 + .../src/V1beta4/SqlTiersServiceClient.php | 36 + .../src/V1beta4/SqlUsersServiceClient.php | 36 + .../v1beta4/src/V1beta4/gapic_metadata.json | 397 +++ ...sql_backup_runs_service_client_config.json | 52 + ..._backup_runs_service_descriptor_config.php | 27 + ...backup_runs_service_rest_client_config.php | 104 + .../sql_connect_service_client_config.json | 32 + .../sql_connect_service_descriptor_config.php | 27 + ...sql_connect_service_rest_client_config.php | 62 + .../sql_databases_service_client_config.json | 62 + ...ql_databases_service_descriptor_config.php | 27 + ...l_databases_service_rest_client_config.php | 148 + .../sql_flags_service_client_config.json | 37 + .../sql_flags_service_descriptor_config.php | 27 + .../sql_flags_service_rest_client_config.php | 33 + ...ql_iam_policies_service_client_config.json | 21 + ...iam_policies_service_descriptor_config.php | 27 + ...am_policies_service_rest_client_config.php | 26 + .../sql_instances_service_client_config.json | 202 ++ ...ql_instances_service_descriptor_config.php | 27 + ...l_instances_service_rest_client_config.php | 583 ++++ .../sql_operations_service_client_config.json | 47 + ...l_operations_service_descriptor_config.php | 27 + ..._operations_service_rest_client_config.php | 72 + .../sql_ssl_certs_service_client_config.json | 52 + ...ql_ssl_certs_service_descriptor_config.php | 27 + ...l_ssl_certs_service_rest_client_config.php | 104 + .../sql_tiers_service_client_config.json | 37 + .../sql_tiers_service_descriptor_config.php | 27 + .../sql_tiers_service_rest_client_config.php | 40 + .../sql_users_service_client_config.json | 57 + .../sql_users_service_descriptor_config.php | 27 + .../sql_users_service_rest_client_config.php | 116 + .../SqlBackupRunsServiceClientTest.php | 317 +++ .../V1beta4/SqlConnectServiceClientTest.php | 174 ++ .../V1beta4/SqlDatabasesServiceClientTest.php | 449 +++ .../V1beta4/SqlFlagsServiceClientTest.php | 115 + .../SqlIamPoliciesServiceClientTest.php | 56 + .../V1beta4/SqlInstancesServiceClientTest.php | 2292 +++++++++++++++ .../SqlOperationsServiceClientTest.php | 236 ++ .../V1beta4/SqlSslCertsServiceClientTest.php | 304 ++ .../V1beta4/SqlTiersServiceClientTest.php | 115 + .../V1beta4/SqlUsersServiceClientTest.php | 383 +++ 671 files changed, 103371 insertions(+) create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlOperations.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSql.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlConnect.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlIamPolicies.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlResources.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlTiers.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlUsers.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AclEntry.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AcquireSsrsLeaseContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AdvancedMachineFeatures.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning/SqlApiWarningCode.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration/TransactionalLogStorageState.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig/BackupType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings/RetentionUnit.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRun.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRunsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BakType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BinLogCoordinates.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/CloneContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ConnectSettings.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DataCacheConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Database.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlFailoverReplica.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlInstanceState.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlNetworkArchitecture.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlScheduledMaintenance.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabasesListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterMySqlReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DenyMaintenancePeriod.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlBakExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlCsvExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions/MysqlExportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExternalSyncParallelLevel.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FailoverContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Flag.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FlagsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GeminiInstanceConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GetConnectSettingsRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions/EncryptionOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlCsvImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlImportOptions.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InsightsConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstanceReference.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesAcquireSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesCloneRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteMasterRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesExportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesFailoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesImportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListServerCasResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesReencryptRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRestoreBackupRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRotateServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesTruncateLogRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration/SslMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpMapping.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/LocationPreference.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MaintenanceWindow.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlSyncConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OnPremisesConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationError.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationErrors.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy/Complexity.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PerformDiskShrinkContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PscConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicaConfiguration.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicationCluster.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RestoreBackupContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RotateServerCaContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/ConnectorEnforcement.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/Edition.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/SqlActivationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlActiveDirectoryConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlAvailabilityType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackendType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupKind.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunStatus.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDataDiskType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabaseVersion.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFileType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstanceType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAddServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCloneRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCreateEphemeralCertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteMasterRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesExportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesFailoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesImportRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListServerCasRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPatchRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPerformDiskShrinkRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPromoteReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReencryptRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetReplicaSizeRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetSslConfigRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestartRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestoreBackupRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRotateServerCaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartExternalSyncRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStopReplicaRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesSwitchoverRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesTruncateLogRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlIpAddressType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsCancelRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlPricingPlan.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlReplicationType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerAuditConfig.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerDatabaseDetails.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerUserDetails.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSuspensionReason.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlTiersListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUpdateTrack.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersDeleteRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersGetRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersListRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersUpdateRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertDetail.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsCreateEphemeralRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertRequest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SyncFlags.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Tier.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TiersListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TruncateLogContext.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/DualPasswordType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/SqlUserType.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UserPasswordValidationPolicy.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UsersListResponse.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/generate_ephemeral_cert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/get_connect_settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/patch.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlFlagsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/add_server_ca.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/clone.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/create_ephemeral.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote_master.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/export.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/failover.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_disk_shrink_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_latest_recovery_time.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/import.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list_server_cas.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/patch.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/perform_disk_shrink.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/promote_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reencrypt.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reschedule_maintenance.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_replica_size.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_ssl_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restart.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restore_backup.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/rotate_server_ca.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_external_sync.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/stop_replica.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/switchover.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/truncate_log.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/verify_external_sync_settings.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/cancel.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlTiersServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/delete.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/get.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/insert.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/list.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/update.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlBackupRunsServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlConnectServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlDatabasesServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlFlagsServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlIamPoliciesServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlOperationsServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlSslCertsServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlTiersServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlUsersServiceGapicClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlBackupRunsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlConnectServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlDatabasesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlFlagsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlIamPoliciesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlInstancesServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlOperationsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlSslCertsServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlTiersServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlUsersServiceClient.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/gapic_metadata.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_backup_runs_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_backup_runs_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_client_config.json create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_descriptor_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_rest_client_config.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlBackupRunsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlConnectServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlDatabasesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlFlagsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlIamPoliciesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlOperationsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlSslCertsServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlTiersServiceClientTest.php create mode 100644 owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlUsersServiceClientTest.php diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php new file mode 100644 index 000000000000..3f0ba3ef12ce --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlAvailableDatabaseVersions.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +Ë +?google/cloud/sql/v1/cloud_sql_available_database_versions.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2A +#SqlAvailableDatabaseVersionsServiceÊAsqladmin.googleapis.comBn +com.google.cloud.sql.v1B&CloudSqlAvailableDatabaseVersionsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlBackupRuns.php new file mode 100644 index 0000000000000000000000000000000000000000..2670a3353d7345299c75f25823464620a7dbd78f GIT binary patch literal 3527 zcmbtX-BQ~|6t4L(cnRPrnb_k_8^uW`K*27~wCR|Vjk zqf)Gk-BXbsV9|CgYH5}scD-H?JECUwZDL?2CyJGZSZ}mMsZwp-0aw@Z91R!6eaqT6 za9%SkPtUtYM*eu+e^KB?>8jeHXDg0px;c)Gkg4{uYpWU-cbZ#IF;#Vys+}DU(GYgg@Ks8blLas#5rOkGKjk2_>pQUcr<$#hz-o z7+@~i_B>Og#4<(Z&@eT;v@H6V%=Vsbfdrf4fK`*J0*Z91CdH1a8l4JuHHX;La++XT zEbe0(YRN{HmV>Yij`YMOpJTCjf#jx09S=vNi=u<6=a?IuHv>2epE_eSE7_z|GEIxA zV3}^Qcs{3dh_^YG4T4Sjem>g-8~PSLP>+e_yt`|3ZT*FYHQmF0BE1Lga5Y*4GKs2v zdprleiffNaux2G)50_{ga(XEgl}Y>n{dW`P-!qwo8@@x1XMYY7K6kvHNd+jXO`sB( zyngCuZbv@!n1)I>5HT=VyF9)#&}sya7Z#*vo(=@@4YIo^GgLMeY+#D_@R0|)2?$LP zJslHcOOrwp%@Px|gi1(Hz(_(^L^FWibS}!7lS%MYGrpBE_$?E}&`bIF^&1 z;ih*7q@wkZYuK#Ez}6%&Q{f?+qNg@a&w|TB;r>{cs17YK7GPEMV9N!dbOL-6!WZcJ z2}o?6D3K|mD@jKaY>oq6M+p}jJ;fmAVfq>$0wcrHIPLU2ANdx2q7(N}!KUV%+H5|G zW|=**@AJ&oj`|5zbZZni$d&6Harqq(gJgMx=7NsPbMFTDFBGz4 z{X>a&K|%o(V9BMtvP_&#vH50AbSune*RL7ZhW>&_QhNvRvnQ{vMj?e3P5hE7 zqxH1%M+^xeDQNP+lHOR~J(t|h0Lp}bpd zHsNDjxQUV#sV23mjk?m5>J{cb19`X@js`fh%#RO(Ut*<(=EGTVX>X&CBNN!I)+-mO z%k@%Ie$r?Gb(l!=$qTt!F4d9~D{Yhv(LfVk3wP1&2q06W^`a?_fX<^tsoiQkEw#8H z@Cx&&NKZ@kN^+v`a~$1_;<_?+j){haUt=ilcL^bXdD^gJ*ib*ojNgaD>d%&c{O8}F zCN@_#*by=4EpGmG@N||RG$0roJf7wKbY{U|R6i4biJ?j8Ji_YL?9Ln1Td0NUJ)kE1 zFKWMmc77{+7wv|c-dhNsYggggJv$5u(d_%iK z_A#gWmGFU7Ge7)UO1Vdds`rT*#D$ZTn}e&!-zDXMQrj)&^Cu@KBOmjsM-Tj~$C_=Z zv}ZZ})vL@Q5S%?&>gRaCEd`|@(75?-r7qq>n(SiGjD5H4H@v|)#OlLIl3#{^IV3wo nvAY}mw;SgT`{9G|^ttL^03!DVw)+!p%w2(7`e*txbcWCyY?y05 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php new file mode 100644 index 000000000000..5411bed1f7ce --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlConnect.php @@ -0,0 +1,59 @@ +internalAddGeneratedFile( + ' +Ô ++google/cloud/sql/v1/cloud_sql_connect.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto-google/cloud/sql/v1/cloud_sql_resources.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.proto"r +GetConnectSettingsRequest +instance (  +project ( 2 + read_time ( 2.google.protobuf.TimestampBàA"À +ConnectSettings +kind ( 4 +server_ca_cert ( 2.google.cloud.sql.v1.SslCert4 + ip_addresses ( 2.google.cloud.sql.v1.IpMapping +region ( A +database_version (2\'.google.cloud.sql.v1.SqlDatabaseVersion9 + backend_type (2#.google.cloud.sql.v1.SqlBackendType + psc_enabled! ( +dns_name" ( "Ü +GenerateEphemeralCertRequest +instance (  +project (  + +public_key (  + access_token ( BàA2 + read_time ( 2.google.protobuf.TimestampBàA6 +valid_duration ( 2.google.protobuf.DurationBàA"U +GenerateEphemeralCertResponse4 +ephemeral_cert ( 2.google.cloud.sql.v1.SslCert2’ +SqlConnectService¯ +GetConnectSettings..google.cloud.sql.v1.GetConnectSettingsRequest$.google.cloud.sql.v1.ConnectSettings"C‚Óä“=;/v1/projects/{project}/instances/{instance}/connectSettingsÌ +GenerateEphemeralCert1.google.cloud.sql.v1.GenerateEphemeralCertRequest2.google.cloud.sql.v1.GenerateEphemeralCertResponse"L‚Óä“F"A/v1/projects/{project}/instances/{instance}:generateEphemeralCert:*|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB\\ +com.google.cloud.sql.v1BCloudSqlConnectProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php new file mode 100644 index 000000000000..6832b2da3391 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlDatabases.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +„ +-google/cloud/sql/v1/cloud_sql_databases.protogoogle.cloud.sql.v1google/api/client.proto-google/cloud/sql/v1/cloud_sql_resources.proto"P +SqlDatabasesDeleteRequest +database (  +instance (  +project ( "M +SqlDatabasesGetRequest +database (  +instance (  +project ( "k +SqlDatabasesInsertRequest +instance (  +project ( + +bodyd ( 2.google.cloud.sql.v1.Database"< +SqlDatabasesListRequest +instance (  +project ( "} +SqlDatabasesUpdateRequest +database (  +instance (  +project ( + +bodyd ( 2.google.cloud.sql.v1.Database"S +DatabasesListResponse +kind ( , +items ( 2.google.cloud.sql.v1.Database2í +SqlDatabasesService¢ +Delete..google.cloud.sql.v1.SqlDatabasesDeleteRequest.google.cloud.sql.v1.Operation"H‚Óä“B*@/v1/projects/{project}/instances/{instance}/databases/{database}› +Get+.google.cloud.sql.v1.SqlDatabasesGetRequest.google.cloud.sql.v1.Database"H‚Óä“B@/v1/projects/{project}/instances/{instance}/databases/{database} +Insert..google.cloud.sql.v1.SqlDatabasesInsertRequest.google.cloud.sql.v1.Operation"C‚Óä“="5/v1/projects/{project}/instances/{instance}/databases:bodyŸ +List,.google.cloud.sql.v1.SqlDatabasesListRequest*.google.cloud.sql.v1.DatabasesListResponse"=‚Óä“75/v1/projects/{project}/instances/{instance}/databases§ +Patch..google.cloud.sql.v1.SqlDatabasesUpdateRequest.google.cloud.sql.v1.Operation"N‚Óä“H2@/v1/projects/{project}/instances/{instance}/databases/{database}:body¨ +Update..google.cloud.sql.v1.SqlDatabasesUpdateRequest.google.cloud.sql.v1.Operation"N‚Óä“H@/v1/projects/{project}/instances/{instance}/databases/{database}:body|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB^ +com.google.cloud.sql.v1BCloudSqlDatabasesProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php new file mode 100644 index 000000000000..481a3e1354b7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlEvents.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' + +*google/cloud/sql/v1/cloud_sql_events.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2. +SqlEventsServiceÊAsqladmin.googleapis.comB[ +com.google.cloud.sql.v1BCloudSqlEventsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlFlags.php new file mode 100644 index 0000000000000000000000000000000000000000..74026d821d785d584ed9684ddc6972899b6a5772 GIT binary patch literal 1992 zcmb7FU2hsk6fFkZVW<+aR%A?-YU)NcZsSF!Q6F&K3e18~ZJ@Am6borJECU{8*IvP=qZExZ;hjJa`S{t|8CN^qK^CJiq-jv(4jK`igc4*Odyy>tg zuAJiRF#Kb|A8X{0vCsongj_PA!Y4MxjZXE9N-`vp^cw*||3ne=dsj~X{O|}N+aW^W zU=h~piU$3FFueTfz+pBPl1TV^!i2?KCK++q_t3{N9uY@SV7Q4LOL@8dhJMqPl)J>~*Ql^L^QFf-04?R4)~~p(r&RDIqpxUCS0uYXCs9iMPz35MMg%%a$=5!G_(b7;39pQgsx|?qfyrU_KqX;GFPDU@ z_e=e~+rny5W9MOC+GF&HIF2``LrX}`+_5zy4ycez0a04hQF_AMa4okE6=g~v#MH5> zI-JNao}H_(08hS)@EdpIpP?)V)fw!Z1#d~X%xwl?`5S4faHhj7vEugtnbtl-n^58a zF0fqs&d@y4;(o!=Zd8^kkPMY+?VUUfC8`4jFZWv&=Vx^2S>r@U?Z^c=X;A=>}fa*mS)GTb0a{8_xm-vM(7{WL3}y@ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php new file mode 100644 index 000000000000..80accbd77ab5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlIamPolicies.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +ÿ +0google/cloud/sql/v1/cloud_sql_iam_policies.protogoogle.cloud.sql.v1google/api/client.proto23 +SqlIamPoliciesServiceÊAsqladmin.googleapis.comB` +com.google.cloud.sql.v1BCloudSqlIamPoliciesProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php new file mode 100644 index 000000000000..8867162ecf31 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstanceNames.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +­ +2google/cloud/sql/v1/cloud_sql_instance_names.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto25 +SqlInstanceNamesServiceÊAsqladmin.googleapis.comBi +com.google.cloud.sql.v1B!CloudSqlInstanceNamesServiceProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlInstances.php new file mode 100644 index 0000000000000000000000000000000000000000..a4d17c35d2de24fab89b645915c9bb8a230a3d01 GIT binary patch literal 22017 zcmcIsTWlOzTHdyEv5#Y?Q;CzdbD5q>X5wTLd*WngC(g`d`ck%g(zoeqCzF*$(e5tW zz3JO@RVU+J1_TILkU)ZcKtc#1K#PzNNGnz#t;7=&5`q^N9`*^4ctbq#!W(@5Id!V5 zs;k}IS-4-%$C`$*k&!hcNDh|&3LEVw%gTqBfi($ z-#5GQYP;E~H_Yy8Jf1GZ^M!I;OJ~Y&Vye~db*tt^{Gi=FXqao&M!Q#Avp#REy}T#> zFz|;_Z&`MwRW+?uPMNV*rDS6_YvBuGA`aWp|4c*-a6VUH$XM?$djZ7^^la zmKEm@@hl@rvG1@r{@3a4HR{zk=-c?ujk<-!>UO=-sDB&#`7pj;X;>zx436FJwW@Z# z-HOwM0?@78iVK=F_C}|T{eKvjpo+v2uwysVvdwO*(%4O#R<&F2*zIl+LpL@KOxtB7 zJz2TsEKB6-`|%Zlabsfuh-H+;yrX*@LS1~qWMk}r;Nw7EB_x~iq?oMPt z%6Tz-mD}4YOl|jY_8u+as9@b6bAH^J1R_XY4tWa|Vo9y(B{@;#9q606sv*Q-1_a+5RR|9&d5t#{fI4j7fzcE z)1F{u^;aV74L^Zq+ct9*3yx=k4LtU3;NI~YNSgy|sNanQH$r11g2kW&lGFd5m{KkT z#2}u2T)9%_5$!J|r9!|2pkGlFLyX+OlW~JU}Llq}j{E=_* zyT@-nKwo{tE_#>WGAGz}kZqafSIIUXb+zJ`7%au?OUz@d!g%ldSoBsXi_%CD_9~Vs zjZUqyOJ3Gw>z2!#1$Jt`-hjP0&fz?pYgWE6;K+In+u{ylUQrn9R1QqTZoe>FvFV@} zIl;Y%#^S+6q%X3@*8#QbcSgmET|FFsy7F55`Ha2kg^s`{?6-r2X#z(|zINZydd{U8 z^(DLNrL4cIV>=UC#X4iPJ%b`cyJvH{bL&e|@G^3&%J@!hAfj&icZ9^jv~{bIYPa_5 z2jjC-eax1<_(8|6^tE%eKT&@z;#Uiz(C(VaO7%srGd>XIW1rry%k6u^dOyg7Eu#K< zB)}8O0Zpl*6F^D$pxhq;C2SQn?T=f!VCsbG77YHn-3CV|CGyJ=e+p6VBHIUJvh4}< zMDd5McaP`E;1cSuM%WFnq7}{Ve!JUD*R2=&VYl9TF@b!>i6R5^VHvjhg{@kCZ@kmN zdCQIDqxJpu{Lddm*ot@e(BJBzS?e{B%TR9Iq9fr194PoSG!ZI|ao0;CwNrnAUGa}M zTh;DS$BiOmFy;dX6Ge}?_0>>JGGHNI_!m%r2N~ATx5`ttyvH31;+8WJCmo~8y&Vs1 zbL-*Rg!DuGS;9qbf9<=GNb)MXYz!x?{!fI(h7nMf*coSPqu#9B9K}gaRw=PL=aqfb zF?oz#Sbsm1Bg4qAiWg@gwW_*l+x6DL1Sy1aja@|E2|Am8QQJJkqFAlKAW{b z*=V+FW{i@Tg>^lY`x7Bs^`g#!v~q)8a&UBoTkZoniB)HKs8%-Fx#p3D+7HL%=P7)@C6R?ZyJO|vVbSsU9 z*)SUBOS2K1;cJGQx0gXhXIhqKiJYatqTUglg(|zIeOA^=`9#*xpXXCXu8B8nF|6@x1gw6YaLot?fnXOWyoPoxNSO#Wi3tO2~A`4Py*i3Qzxz7KZ zO3t%6k9^dBoA$>m9>KlnC-BxjbtL!r6{+JAJ7>M9cMPtRNNhPE;;`f-Tu8EvN>l~U*6q6e% z&v9>zI66-DNtr&VT7i`u%<89X(T%0vdJHN#^GK*$CizXuhMds(W~c|@GvR`G+H}CK zxFka=B+3?BtntE$(d5;czzQp&D|iXXg`TsEfrX?b9KuN0zOVrN^>Y{OH}5akPt zU329`K;^*@iHC#u9d@!xRt3nk;FVB-jy#l$Y@ve0F!!CBkiCN}gRiA0z3I*XKB}LKlY_Jq|Dpj&9hTaW)lYtTxU>ns+K;+@YT|YIs zUX5LL_cnOqQ#5t~y&QhjG#c%Lz(Tt>LpSE3BbTvR++8M7{k&K2n!44svL*^((lr#> zaz(r{EWAUif|r36?}RQGq$pSYy9itLhKHxeBGnVis6;3X! z(L^QbF&SY36Vp%++3rp6HbRs6Q2fZTn`oUiD-8q13v~1h3sKQH*yDOWO-%+gjVx3R zdD1I45iqO&d96M|Hhp124xk13-ncOw%&|(!QCd61&zUs6sw5lB^I_!zMhji;AVIShJprVp0JOqUSWsS`sljKKQ zN48f((a3Wz?F4QAgBVG27PW(Z%HW(Txvb`f6cFU{(nr#!WE$b5v&t2A!O6<%&Yc0F zmz2BDDvNC1S;$d=8Lk5Fv3Y6~)KH=0rVq^^O}i{NvWaum z9`pt}+Mi3>GsfHp>EzIPMnZu^VZjs65W!<-_;SYw z@JDRk} z#D*mn`~c*q^iWi~%vMd59nOQm!us`4sen;brovdxr*o*pn2mj-feLTz0^eu~r_`R+ zFuuf+J@ zh&u<619xak{0W?+g&@(YRk}xp`%dNWp0TT3gZs6^fLN9>Y;HX~DpSo&6Gc?4?`J5I zz93=pUOg*znNtjxjh`Ypte(YdjbEcpVX0-Q(|9}#s!yS8@uMl2D4Z~gN*@b;#8Jr;Ii^A*!Hdp0`a}hgtZw`U& zW&{G!JM3EJB}}%mhXCebrbKVWZjs9rgD>LJcJ zRa|f~V`~_(u>Qf=lF17q2@efkDpu~Y%N?uAbA0Y~Y`aoDY?4FfX80~4;aIn)5Xq4r z%+y+zhzR%k@22V94HoTmkp#jx+%fn0n3J&xgtdKwMj=~x)x|yxm_5%h2W??OA}IJJb{kjU@?CHFWIU)))@N+rxI>7TYO~3 z346i}w@(4m@~2FJX9g%p#$e-JTWB7UKR#<) zWV6*u%cxNj#+RPq(F6$_Jw|+V?9wTDKV}!@6U?d9AZfJok#ajZ$e?MuIxbovOYD*n zPGR|9r#Pzu7NxY{VxY@jTO}`M^6YM5{gbg3IY5{)821smIa3(#J$8fEgXDQ$--Jfj zD5Hgw<;Okm`Q)T%nmlLc28bzdp-ud0)+p?hjl!mp&gf4Jy^LN-po@a4bG}f@@lx?Q zHm?^p%Z9$aQ%)D2<GPVh2$fXb(| zP;4k&mv-{`L^4Y?aWr`J9W;RQY4m%hP!d|8e`oSrX!>NevKF28K1-D}Y&LoVIm}!x zk;#{}JgpNwiAx}-HWQgFh@7HBgQ&S1-Z7__r)DDR&-05oA?`<6LD3x8^IG{?q4dN^ zlv3N7vX(0El!Dy7!eV*tS?EaY2yYA7bokq;f6$l9$;MXM31)O&WT0oQHBJZ>MnH#992`wm+c zSL%$Hm1?ioG@1uZB#A8wH#NuhDKZN0j?wLQ6W-n82^73R70nqrnocVYZSLIPW*3|? z6>bZ{i_39T6LZFKM-Qc4M77TR0%_^Xy4CKwBi&AxT(r(m?OKDz7Dr{c*4ostf1#YGI8%xWG&<)T-fGRm18 zoTK{R5q3VL6%i;gJaU`82X?(ixrc=+GR_7^qcek{CvaZiP;$eLYGkFu?otF0drp2R z-SIx4qrE)iLP?_6;U$I{wZP`ZWTZpX+zD*-U3OjELMQcyuE2nigrU&w9+&wE%Qc57 z^&vYe^C(FYwH;Xnky$eLd;QuDpO4Ft7a;5YjWIdj-#tKyV$Zq%(Q6rX;S{G8++}nz z;h|ur=SHO{{6Augp#|)~w$U}=jRRTt5%?Z3Ww0h4n2A#*6}W8_2DmEBs{eR~UzHtN z+V$`5XV?jM?lE>aj2h)j!`^Z0!6~?g3RAt|RBHcXj^9o@cFqI#E=6*GZ(i5RWlAfw zQmIf1GsBBaNfq*WM0{$%Q!;_b4|~M(WG0W+yOA%H4I~^eNlI1TM0+HkD&&gj*pro} z6XirQp=-udt)znlG8dR~Nh@a2r8g2;q%P^_24L(Ik-#jYpO@EnHa9b=jFvAO#Zu-e z(w8mDWpEP!mtuB`#XvQbQ=V7Sqh~0Q9UOtYODkd7LQ2zhO^?nKo4l+bk>-iH zdUQd#&fbuKOKIJZ-0DZny3zBrZSP#@1L=jfnaO8}J<$uO{harX;P13jbdluN zr!AJqCvqBuuj4LMYCC$7kU>jwkc2B!v6V~8Rkq|M>*(ty9RbSG7^S4nqY_f;ybzVJ zhv-sJ-Sl#ygv~+I!7VMiOftx3a>#|#hNF}Q-B$Px#3(0OQdrk;0}pi8_=Y!lx`HY5+_S)@P=2NH(^0Quvv)4 ziJ@MWxYp_T0X_Pr@-DlRdrqE$WDonn!6ipFM+OyUnJTGFwtyQrvpaox#6X-9 z@&?>SF;j+WY~oT7sd27=h<=00N7ut$1$GN(Bpt?E#7@1iQ^LuKEKA=>>ZwwOb54)G zEu_qKs$8H+na$@yyU3(=Z<0ZHrx*a5+R2IwMRZEs(W5I|i(msD(nhMVlP^bak)Vrs zMK_sTjtK8?d%$0bqi5!uTJ#;l<>Oc`fumC%xlRVEeMkL2R2GI6dQoFNY+EP+QkhKD zEo6M*F^q1l_fUfNw4(6DEg143NsS0IB>9iwo4iq0y`QC}<5e|&bJGy%y znhDfU>NPtC@AY&l_94G8Hmf{lXPu-%Mr>XpAJ+JiN8%EdKagXY>VHKjQwXU}%e{)7 z>+G_)Y$sE9W2jH`FL=#?pd z9AR^wuN{@}&oDf!v^=97^H>h=92TTXs*iu^$N%}gsfX$}=p$`3H0hg3YwbJEzrI|n zJ9T3`lmGm34edz+N#9^9zZ+pE`Go-`{Q9{UA0IaWL z8n>vF@Na~@_%KQ$8}F8+>X@)HkqMJch})lIsGS%nVU2RcuVoW;ereU=7CzBFg&=|i zb{uftZ*WK2#44BOiW(m!O$Q3%>j}DHs)S$I@JdeHnB^bxFNfc~bOWOpD$*Erg+o%6 zk&u+Xjj(x|Dnpi~geQJMRPJ~w!tem>gXfv!;7o9wkCca_SmzC}4IkX!Mu_Df36BwC zy&n^g6zfBd?f&{CHsDAY!EB-E`-oTxzjEf~s(*rH>nO{R{%&Iu4kCf^eBi9WCA0pQ z$x8UgwO*+G!Q;aGh%@tj^}R`8TJG1kL( zYc%wgwULR8Gjd#jk2o*CuHK)7mjKAopxrZ1>$T-K*kjncZ~V9@w>Zj#I+1A;N*9@9 zOg|ve`|hicBYNM2aWQXm%t>`3V-i>9rEhaUe;?^A`t|gwJg-TNko^V8X@VgQCJ9k4yHUB>6rpEJfEs9AA5UN&2V0()JK!}C~^1B z{V>kq=ilQKB6y&|KDiQpOVJysLg$UE4+Xx5jGCBa5Aa}vNS&ShZ-g!58u*Y8oR#EA zaSWd<_mujnXgFEfr+nj2)XhmYj)KRKjcr73D}NKgRV(s`-a4A{a3tD+IdY?;@*?TV zKb&L_+%tL+67(Md`oPaci~)UM&bZK@aQ18JM9@*Q^8a9lqjNt&F%RcIy6Gx@NCO>o z6uif<{g7F52jQ1cy@nS$*-&<6z;w?{by!E5KfC!6|ZAqf|;} zG#^ZY8~(tDk2LB(;L*UK!4HX-`9@JCbp{wla~&gJeQ>@?*#*Soa@8 zHo+-!XQMsE;7n&zpKx68MtPv8I3G8t3mvjIpc1c7r(5kKWbbOlMbVzN?QW z+f_HvN?HE7e@I-iK5tZNxQpuO4t^8STE)+p{&T`OwC#?yv9|W=)vLhEwMx%E6hB*f zw}X%A$o1SAH5?0BqI$o|7fj+SgiBZ{OlgxBP!8|aV78Q4%b13^nA3M)^qb LgP>osFB$uPl_N%K literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlOperations.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlOperations.php new file mode 100644 index 000000000000..d08bec17efcc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlOperations.php @@ -0,0 +1,52 @@ +internalAddGeneratedFile( + ' +Ó +.google/cloud/sql/v1/cloud_sql_operations.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto-google/cloud/sql/v1/cloud_sql_resources.protogoogle/protobuf/empty.proto"= +SqlOperationsGetRequest + operation (  +project ( "f +SqlOperationsListRequest +instance (  + max_results (  + +page_token (  +project ( "n +OperationsListResponse +kind ( - +items ( 2.google.cloud.sql.v1.Operation +next_page_token ( "@ +SqlOperationsCancelRequest + operation (  +project ( 2à +SqlOperationsServiceŠ +Get,.google.cloud.sql.v1.SqlOperationsGetRequest.google.cloud.sql.v1.Operation"5‚Óä“/-/v1/projects/{project}/operations/{operation} +List-.google.cloud.sql.v1.SqlOperationsListRequest+.google.cloud.sql.v1.OperationsListResponse")‚Óä“#!/v1/projects/{project}/operations +Cancel/.google.cloud.sql.v1.SqlOperationsCancelRequest.google.protobuf.Empty"<‚Óä“6"4/v1/projects/{project}/operations/{operation}/cancel|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB_ +com.google.cloud.sql.v1BCloudSqlOperationsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php new file mode 100644 index 000000000000..abf01220dbad --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlRegions.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +š ++google/cloud/sql/v1/cloud_sql_regions.protogoogle.cloud.sql.v1google/api/client.protogoogle/api/field_behavior.proto2/ +SqlRegionsServiceÊAsqladmin.googleapis.comBc +com.google.cloud.sql.v1BCloudSqlRegionsServiceProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlResources.php new file mode 100644 index 0000000000000000000000000000000000000000..fd0a2267dd466a5c172870304d11f042e2bc1841 GIT binary patch literal 15132 zcmbVT&2t+^b~i{$A{rt%8p$r23tLy~Pu1SMIbZ0`<$A&E7<41kj5l6Ptd49N*W z0G`(FQ`&u*o+tghvl1FN0hJxLD^taRV$4SKC!C%rq|+q0Z> zt9R75JC?JWP8X`_O0}8R3&rNU=<4={PRrUz@ArE99qV4J(;K$$x!-l}9j}QW27VZh zCEjyaxn#z==8@(0&6btks^!Yoz-*fX^W_#7@-k0CUN*k#ynMFyl(AOFblo&>L|fex z#eSQm@n3(q+p$||cVG_izxQm{u)FraHaqr@u%6G;duGSAAm#MCd&6#PVE4Ld>QL>r ztlM|eLMFZYUcZO+f1dUxRU?%^9WRUBf#r0~&dY-3wj8@Z=s7jKy0Niu4SYpX%k4XI zSQ2ONrEiNlZfu;I-qmEw7($L6(GNAC`t6Lo=|J2pE*D-}z}ZpYPiwrIWX+hQ*a5}caBgG6>^RZi8L z)vB*{^%9$-BbAyZ5xLo4YBBX9n>)0-?bIAKW&U`EF&N2n)9KpXef4{6uGMRcA(PoP zPjXNRtE1OfaqdRH^6028vJ2R9*W4Ggi>pa?-m&&!K4K1;zlgC*r@Ot!(v7c5hE^*Y z&$W7`SlKf2)q-y9R2nrsU)(I}1?4UE3RCO)R3yQcD1a1ZPfL~ zPN~^2^sn=}UT7GlV!7BeX_wp%;vNT`%aBW>G6Olv#C!T`5+YdcC5R zj7C#y>c*y4EbY{FWiIo}7+cPnt;1ozZVjw19fF267(h|3T4zZdMbT&s;VJkwC9@lm zI-4M6)t9>i3F9 z%`rX3*|~gmr_xknnLjztmc-=pz3!g9FYQ@X8NrtaEZ(>XCZy?w)zLM9kxzauF+d)Kl0aOB(r@y@2xI)Mts4`2Ae&$GEgvGFC2I83_nyx7cdlWS;JjeM!PQ}FuYjKc+p=Q!Y}9?!xLE`)o` zpmZfTzv)6Nu3buRLIB@LlAyhN4UJu}mk~km;?uH9UVeId62QZtt&ldax z#b3O{;?hj)ws^-s9OS^`ng5Bg`2ujxuIXC-BXQ*5PFn}21FPakE{=u7fxkNZI0%nQ zJ>WFoM1+RR z{8@~>|3+_)O$_!qgq?AV73)MxAGrQi&uL5hMks1^Y(!e)&^nP;zQR=5*0P*|y+;AU zN(q~XZL~}y*v?&k=C9*yL4V!vIRng{pUecC9Xd8QDSom%`=qEli-X}QQN*w+Q%QvY zVGv>T`UD4DKA%K(J<>EnqY+pV4OP(<5JGLa$KwJ;G<)=B0`u;1Smrv5?*acBgOk2E z@yTpDQWR!GK)H$cR0Q_k-d?9?wq@8l4Jk(<8MEFs565RM0@EALI%gh+X1(%9F}8#W zom$Ohb`j1Bj>-6Lh}bN5D#a9}SZ3cc$TuQbT8{LN%WUzxAx=c#f!Mq2?D8I^L9T(9 zkAOsw)Ec{&P^E-Oh$OM)5ld;**sY^KQaVKliBN$`p3lhaap4n+&>XpeYTEfQZXR=OKqDd6G|9>$ta-m zfIM|EncsoSDjrRAS@4yf%aR8m?6E@5K&>!J{RNa++zM zK3Wv)rtZBM`OkgF7#RHxBN4fxTqGGlT#ay%w6}3}l8Y4i(gYVt znvJjg)2w%J!?SEN70AXp;qlHlC84hE$Rj5D2VC6v4zKFIK+m`W?%_^L|FrHk^wY*AWepF*72ce5y%U{RFjcnWV&R%Evj_|N7CzF_lM zlR^0j-=SnSnhqFK?`p&Cl!;6Gl(D|sl2~1){?R!|&6W9!NW_0H#x8h5QtWc0Q8LP> z*|b~irdBFdpMxCIEBX41S`)dmRw)?%FXY`SOZq>JYNhl7x%SHs*{x=Mr$O)MOGWTZ zMqaNs!P4c4Kdb9s?G(YWDYLl+mM}(3$b8G<{!G;rOVA^aZXp|*=hIg|U{`6IUSX43 zfY`$$WT7%amHv&JdM?Q>a_Le;ro+^dWO-_ipH^kql|5w4y;sJ*X&K;@JvK=kgdBxu zgv}rIx*lbT1i}Ry)NK=A#oLAJ3K!(BfYOHqD$`YGp4#bF0l-Bv{UQ^(I@Ej|1CefZK5SlIPXOY)Qx`hzAC+V|Dl8(P(jJV7#Z^ z%=#S=Yz7Jo2GW3`Od6+m&ir}?1Tzr@QMoU15$)ko-{5&y*u$Qg+hSTUv@T^hVESNg zWKRxg|2J9FXKYy_>;nr_?XG3Q!}I-=$UV}i9z75Q?SwQLgm_eHEtsNkD$avHHywDn zmfb%9w4*#Qu71w0f;zJIPPn^-u7lY)v5(Vzym!zNBrKz`Ys9{dqM9%^kEur3Iy`cT z8!$MHK#pXTy7SPM$+62}5ky@MUBWzGU(DA%P+w1I{MPpjWK~5T-1WP(CTYNl};BBGo{v z9HNQ$F40J0iT;Z!jU?OnNK4cpXUH2aQ-e^3n9JKFTXunpw4Bz^l`GUJyZMdF)F`|9 zjVZXWd8)crpJ8EF0}7GKTv0DGrLK=n^cpQ2IJCl1CrU}mb+^}4n(X9+#nD*v&k02-Fa0fP~BK(=ehS6$w6WQFb>Pe{B#brJy~b~AhH2- z5&mmEWCtf;2^i3!2QMkGPDhAp2{j57t2)+eRH`_nPi7xSI`Tfe`UcrH<#CzsGZs)I4kz9FDCu7p zn=i)f76&Ep42NFB)e+o>_yj%+1<$+*HXm^XHzEiS!#Ge;qPB2Clli#{5AR(G!SxNV z{BKA&IV}(LfH>0WYXM4QEKBt=UYVv2Y=CTjF8o6z5Lu2TXxEL7xoe?FdyexV6Nq|{?MMlFz!eP8Rg@7(I~JEFqOU}GCO{}p^Lt8X@&!|X`T=Z4*K1M&u0`Y2F**n| z&{D)|QiQ>xF!YEjE1;|;`4I3Y9wEY!T4It$BM1}#MzVi?2SAj=liawXfhwIIdR0`x zKNEcooNrlRA@G;XMz0*&qwbWdaZ}1M^=QPf7_V%iSW*gK_y>^&5nwhXA+yOYkKk@# z2L$MiHftaBj^0}JSQHvc!f`Xg13++Z56y;(l3UtqAWu~9APj8 zk9`7Cns^M(i%CYpO{KWe+>P9}Xj1Akw&?Rn;`pSl@`*+>Ut?UK|BAg0g%E87dfMuOq;6S92$iWc7nO~kh9?R$5MA|APYxeYY8M_4cbXxa zoS$c!@ACCcF-<`4IA!aCFwNlgxQYvMX8V}f(Kbv1*Y>)Wu?LoF2#1`y#U(~F;+pJL z7M(U_A52o1z6izACf?_QqCE<^lVB{@*>$lZkJLZvaFDYvxRliGvz94}ENe(&#$qS# zlF;=OLBfRZ8Ewowj%D_EiR@Hxc%Qw?FTUbN98wXwuUV@ig&T(}$T+pqbL~X~C>wcS zMW;+@hIEb|1-%T~UYVtgB(udXNK>H%gs$U@OQ6Afv`8mF+Us?s0LU6~f@`V8%!!Do8}Db(9J=tM$BIrW!!_>K<~MO0|iUMiv8zWS{qc&1BZu@}ylx z@lxJe;5;q(V!^YW%lujtHu4~zeE1_YPOK%-QP>r#uXl$>yZ)^Z$}jLt!lrvH0bt3= zbh<+=xZ~4?JtCLDr~#E8dE6jD;mF(AXOmi3n0sKZfhh*Kc7T#_Vg<1Zq5!T=+|v`Z zDz^9^!(w?m5;x9X6lh_arIb1ac&^vwm?4K){qYso8dk;U??EAyD&#N+09 z%F#oAfouyLN4rN3UiSRc7%EIr9`01P-C^s{zsUHIsiV8C6fHRGE%KZxc}A8k4*PUd zX_T9Y9h}@J^Ut`(J%KZ#DikpLuur#Su_SIxq6)Rb7Rb?~)+e8FMQz7$(-pk&BH}k) z1M@I}Fs|(xdU_w%G9)`K&1>@HwrA0USF!@r$SEx86&l6hbbFE@LvYAkg2fGQpu1Zv zfnD&gbkTiS&|aHG&=L`h*9A6<$8aY2Bj0!iAAmn{+Ly}QU5#DvF1nz0h_34fDVnAy86mc(2LMS;WRNG{E;({zZ>0b39y5%#`WtT&p*mR?a}oLnK+ zgGh@4Z<`?p;!!CWWGF6Wga~$&G-;S(&Cm)3uqlnGk%+R8+y{3`)t%;6Rd5#K5phCb z{J=Sti(6m~QRZBe6PvsH2NyV7LV<-~?lVy~P$gU9aasoabK|t*#UjfuXoe4sHD!h` zGSKu;xNstWytf{KVGR8IR5?#n4kUmA#1KaI{@SN>bGlN{>IEgiuR(_&jvPC9LS)2a zeZh5-p1>F)BOZJ9T+b;AkyEv5qq&9Gj3>q;5SHMt{Fb%*3MULl4QmPuzmZiqgE)F) zU0Dvl@j&Tfn1IlS%3sDt>waw9S1!{$gjVp=SbMD83Abb)DLZ2=pDH~>$Uv{`W94^a z>f52FC(2KSwT0eXzpwmNEZlj0P5ImLrmXUh<4x7nvp<4up0{~mAp zRQVT*@qrbrKUV&Ayy=PZZ(~gl?koS!KYIyn=#!D5tei5GCkW*}BDi+SQ1Dn9%Jox* z^28uRc?V80WSH6PXuQ9p3;g7ee6z*Vz<|Gq!K_23Nzdhoe;)&q3E3td(vbfUyIbO( zCdeU3PlFSlr%wfHC5^ro3Zfr6gn#b5p1r~KdD^PI0- h|Iq&^@MG~|W#BtZDv#Q&h;K0Yo8n8!AG04b_J49gqTm1k literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php new file mode 100644 index 000000000000..e33f77f7390e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlSslCerts.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +Ñ +-google/cloud/sql/v1/cloud_sql_ssl_certs.protogoogle.cloud.sql.v1google/api/client.proto-google/cloud/sql/v1/cloud_sql_resources.proto"W +SqlSslCertsDeleteRequest +instance (  +project (  +sha1_fingerprint ( "T +SqlSslCertsGetRequest +instance (  +project (  +sha1_fingerprint ( "w +SqlSslCertsInsertRequest +instance (  +project ( 8 +bodyd ( 2*.google.cloud.sql.v1.SslCertsInsertRequest"; +SqlSslCertsListRequest +instance (  +project ( ", +SslCertsInsertRequest + common_name ( "È +SslCertsInsertResponse +kind ( 1 + operation ( 2.google.cloud.sql.v1.Operation4 +server_ca_cert ( 2.google.cloud.sql.v1.SslCert7 + client_cert ( 2".google.cloud.sql.v1.SslCertDetail"Q +SslCertsListResponse +kind ( + +items ( 2.google.cloud.sql.v1.SslCert2ª +SqlSslCertsService¨ +Delete-.google.cloud.sql.v1.SqlSslCertsDeleteRequest.google.cloud.sql.v1.Operation"O‚Óä“I*G/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}  +Get*.google.cloud.sql.v1.SqlSslCertsGetRequest.google.cloud.sql.v1.SslCert"O‚Óä“IG/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}¨ +Insert-.google.cloud.sql.v1.SqlSslCertsInsertRequest+.google.cloud.sql.v1.SslCertsInsertResponse"B‚Óä“<"4/v1/projects/{project}/instances/{instance}/sslCerts:bodyœ +List+.google.cloud.sql.v1.SqlSslCertsListRequest).google.cloud.sql.v1.SslCertsListResponse"<‚Óä“64/v1/projects/{project}/instances/{instance}/sslCerts|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminB] +com.google.cloud.sql.v1BCloudSqlSslCertsProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php new file mode 100644 index 000000000000..c09b8b6ec147 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlTiers.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile( + ' +™ +)google/cloud/sql/v1/cloud_sql_tiers.protogoogle.cloud.sql.v1google/api/client.proto"& +SqlTiersListRequest +project ( "K +TiersListResponse +kind ( ( +items ( 2.google.cloud.sql.v1.Tier"S +Tier +tier (  +RAM ( +kind (  + +Disk_Quota ( +region ( 2 +SqlTiersService~ +List(.google.cloud.sql.v1.SqlTiersListRequest&.google.cloud.sql.v1.TiersListResponse"$‚Óä“/v1/projects/{project}/tiers|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminBZ +com.google.cloud.sql.v1BCloudSqlTiersProtoPZ)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php b/owl-bot-staging/SqlAdmin/v1/proto/src/GPBMetadata/Google/Cloud/Sql/V1/CloudSqlUsers.php new file mode 100644 index 0000000000000000000000000000000000000000..f15240c77b8951ff07401883d2505da7df5be51e GIT binary patch literal 3866 zcmb7H&r{n*6t2J!vJfB(DUO>as*^S*lh^~fB+jqe7>FB!Js8tT##4T035{TXcaowjF?th(zs zyB5h9meV#f{=SttSdtGKJZNp7cz#--B4q0=;=8&*)b(=yC1JX$GrhJh0BS27pjO$p zYCB7h5Hc*?_f@e7YgG<|-XazLx$U||4b^8lga2+(U!yip<6xygp;<7 zwrw!#*ec&pvJH}2R3#?2z2!O(_Y*aAsLZJV8frzG5zp4GT7me6M_uN4WiZWVcM0nd z$X8N}!Lb~UHq?~#F`GT%j-(ziI>M%DJ?bvu%g7;MjgP z+l{FU@u7_?79}p?sFO65M*3hWu@LOn zT?#eBb0SM6aU=4g!HL)E0rP>uz0*(jLV^SH>w&o_M9_4`3|Q{1~Ty!iZvad#T8XaUBt6!g4#ea)K+{%tiXF-_VH2iG=na{5#JJn#bbOS zSwT3&T_-FAjlxLa5JrMVU?gtng#~$@;`2xF;|RLOLn%Y6J#;*C z2YM)Y1I1N#pv4~H8)!kdEa#AzT0@5tFg2Yq(sG$E@;!#1p=)liStD;;Doaxf)g?3# zAu*I!IxJ#*3tc0&Ubjg90h-Yy#-5PP1b%?Vc`I%ELN$}iHwR`V45K1UIeViK{EnXo z#G?&rh&bb8kmZTwH)y(dGoD7{mSgM@Qv^DJAES5&AQC7qlOV`M=u;=iPP<9|J%(bO zXkIOQ)Rv&4T0+onwZK^14XPy+y-+m{wZUD!cv2hVd>Kddd_gSSM=^HflK2EXO)q~Q zIvH(4LeA+x%iCa#U!afueVC#ia3w~#W`bMP^5Yi)W^#FPAPgW>#1^;bLA&RN&c>&$!OG5 zXd+)NZftAC&DoDIM$;=BrD{Pd=3Z*m%IemvfgM+B2%bYT z-Ph||rD}P06vxqg-=ai|;hX42|C@fyvE(~6+wVP2qU(ifZbK{QDwVHGTLo?VRe4pb zZdS^xE5)_qY60B;1TAcqw3nqqaqX4XV-0c4qgi;_yE*~_yVSchnx95fZAfOA{`?g* z2gTi=faFs&KPdUUcbU}Z znS6=s1NByN`3E($(B#AK|N8g+$o)G@{EIl4dVc0@@as4e4oX-He;#Kz+dlqTL8CAZ zp_LCjBlM>`F%zfEsV{{eS^QvVKQeFm=sw230YP$*oHzB@89lxpx>3( XtH^DPe?CxSz)eh8${W)$I!5S!qn_B? literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php new file mode 100644 index 000000000000..a30afe817105 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AclEntry.php @@ -0,0 +1,187 @@ +google.cloud.sql.v1.AclEntry + */ +class AclEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + */ + protected $value = ''; + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + */ + protected $expiration_time = null; + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * The allowlisted value for the access control list. + * @type \Google\Protobuf\Timestamp $expiration_time + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $name + * Optional. A label to identify this entry. + * @type string $kind + * This is always `sql#aclEntry`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php new file mode 100644 index 000000000000..429f1de7dc04 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AcquireSsrsLeaseContext.php @@ -0,0 +1,217 @@ +google.cloud.sql.v1.AcquireSsrsLeaseContext + */ +class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message +{ + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + */ + protected $setup_login = null; + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + */ + protected $service_login = null; + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + */ + protected $report_database = null; + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $setup_login + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * @type string $service_login + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * @type string $report_database + * The report database to be used for SSRS setup. + * @type \Google\Protobuf\Duration $duration + * Lease duration needed for SSRS setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @return string + */ + public function getSetupLogin() + { + return isset($this->setup_login) ? $this->setup_login : ''; + } + + public function hasSetupLogin() + { + return isset($this->setup_login); + } + + public function clearSetupLogin() + { + unset($this->setup_login); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @param string $var + * @return $this + */ + public function setSetupLogin($var) + { + GPBUtil::checkString($var, True); + $this->setup_login = $var; + + return $this; + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @return string + */ + public function getServiceLogin() + { + return isset($this->service_login) ? $this->service_login : ''; + } + + public function hasServiceLogin() + { + return isset($this->service_login); + } + + public function clearServiceLogin() + { + unset($this->service_login); + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @param string $var + * @return $this + */ + public function setServiceLogin($var) + { + GPBUtil::checkString($var, True); + $this->service_login = $var; + + return $this; + } + + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @return string + */ + public function getReportDatabase() + { + return isset($this->report_database) ? $this->report_database : ''; + } + + public function hasReportDatabase() + { + return isset($this->report_database); + } + + public function clearReportDatabase() + { + unset($this->report_database); + } + + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @param string $var + * @return $this + */ + public function setReportDatabase($var) + { + GPBUtil::checkString($var, True); + $this->report_database = $var; + + return $this; + } + + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php new file mode 100644 index 000000000000..7918b421cd93 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/AdvancedMachineFeatures.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.AdvancedMachineFeatures + */ +class AdvancedMachineFeatures extends \Google\Protobuf\Internal\Message +{ + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + */ + protected $threads_per_core = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $threads_per_core + * The number of threads per physical core. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + * @return int + */ + public function getThreadsPerCore() + { + return $this->threads_per_core; + } + + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + * @param int $var + * @return $this + */ + public function setThreadsPerCore($var) + { + GPBUtil::checkInt32($var); + $this->threads_per_core = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php new file mode 100644 index 000000000000..b78fa08028b9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.ApiWarning + */ +class ApiWarning extends \Google\Protobuf\Internal\Message +{ + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; + */ + protected $code = 0; + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Code to uniquely identify the warning type. + * @type string $message + * The warning message. + * @type string $region + * The region name for REGION_UNREACHABLE warning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning.SqlApiWarningCode code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ApiWarning\SqlApiWarningCode::class); + $this->code = $var; + + return $this; + } + + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php new file mode 100644 index 000000000000..0661de42c5d0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ApiWarning/SqlApiWarningCode.php @@ -0,0 +1,80 @@ +google.cloud.sql.v1.ApiWarning.SqlApiWarningCode + */ +class SqlApiWarningCode +{ + /** + * An unknown or unset warning type from Cloud SQL API. + * + * Generated from protobuf enum SQL_API_WARNING_CODE_UNSPECIFIED = 0; + */ + const SQL_API_WARNING_CODE_UNSPECIFIED = 0; + /** + * Warning when one or more regions are not reachable. The returned result + * set may be incomplete. + * + * Generated from protobuf enum REGION_UNREACHABLE = 1; + */ + const REGION_UNREACHABLE = 1; + /** + * Warning when user provided maxResults parameter exceeds the limit. The + * returned result set may be incomplete. + * + * Generated from protobuf enum MAX_RESULTS_EXCEEDS_LIMIT = 2; + */ + const MAX_RESULTS_EXCEEDS_LIMIT = 2; + /** + * Warning when user tries to create/update a user with credentials that + * have previously been compromised by a public data breach. + * + * Generated from protobuf enum COMPROMISED_CREDENTIALS = 3; + */ + const COMPROMISED_CREDENTIALS = 3; + /** + * Warning when the operation succeeds but some non-critical workflow state + * failed. + * + * Generated from protobuf enum INTERNAL_STATE_FAILURE = 4; + */ + const INTERNAL_STATE_FAILURE = 4; + + private static $valueToName = [ + self::SQL_API_WARNING_CODE_UNSPECIFIED => 'SQL_API_WARNING_CODE_UNSPECIFIED', + self::REGION_UNREACHABLE => 'REGION_UNREACHABLE', + self::MAX_RESULTS_EXCEEDS_LIMIT => 'MAX_RESULTS_EXCEEDS_LIMIT', + self::COMPROMISED_CREDENTIALS => 'COMPROMISED_CREDENTIALS', + self::INTERNAL_STATE_FAILURE => 'INTERNAL_STATE_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlApiWarningCode::class, \Google\Cloud\Sql\V1\ApiWarning_SqlApiWarningCode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php new file mode 100644 index 000000000000..bec292d18322 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration.php @@ -0,0 +1,598 @@ +google.cloud.sql.v1.BackupConfiguration + */ +class BackupConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + */ + protected $start_time = ''; + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + */ + protected $enabled = null; + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + */ + protected $binary_log_enabled = null; + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + */ + protected $replication_log_archiving_enabled = null; + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + */ + protected $location = ''; + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + */ + protected $point_in_time_recovery_enabled = null; + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; + */ + protected $backup_retention_settings = null; + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + */ + protected $transaction_log_retention_days = null; + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transactional_log_storage_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_time + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * @type \Google\Protobuf\BoolValue $enabled + * Whether this configuration is enabled. + * @type string $kind + * This is always `sql#backupConfiguration`. + * @type \Google\Protobuf\BoolValue $binary_log_enabled + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * @type \Google\Protobuf\BoolValue $replication_log_archiving_enabled + * Reserved for future use. + * @type string $location + * Location of the backup + * @type \Google\Protobuf\BoolValue $point_in_time_recovery_enabled + * Whether point in time recovery is enabled. + * @type \Google\Cloud\Sql\V1\BackupRetentionSettings $backup_retention_settings + * Backup retention settings. + * @type \Google\Protobuf\Int32Value $transaction_log_retention_days + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * @type int $transactional_log_storage_state + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + * @return string + */ + public function getStartTime() + { + return $this->start_time; + } + + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + * @param string $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkString($var, True); + $this->start_time = $var; + + return $this; + } + + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnabled() + { + return $this->enabled; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Returns the unboxed value from getEnabled() + + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @return bool|null + */ + public function getEnabledUnwrapped() + { + return $this->readWrapperValue("enabled"); + } + + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @param bool|null $var + * @return $this + */ + public function setEnabledUnwrapped($var) + { + $this->writeWrapperValue("enabled", $var); + return $this;} + + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getBinaryLogEnabled() + { + return $this->binary_log_enabled; + } + + public function hasBinaryLogEnabled() + { + return isset($this->binary_log_enabled); + } + + public function clearBinaryLogEnabled() + { + unset($this->binary_log_enabled); + } + + /** + * Returns the unboxed value from getBinaryLogEnabled() + + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @return bool|null + */ + public function getBinaryLogEnabledUnwrapped() + { + return $this->readWrapperValue("binary_log_enabled"); + } + + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setBinaryLogEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->binary_log_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @param bool|null $var + * @return $this + */ + public function setBinaryLogEnabledUnwrapped($var) + { + $this->writeWrapperValue("binary_log_enabled", $var); + return $this;} + + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @return \Google\Protobuf\BoolValue|null + */ + public function getReplicationLogArchivingEnabled() + { + return $this->replication_log_archiving_enabled; + } + + public function hasReplicationLogArchivingEnabled() + { + return isset($this->replication_log_archiving_enabled); + } + + public function clearReplicationLogArchivingEnabled() + { + unset($this->replication_log_archiving_enabled); + } + + /** + * Returns the unboxed value from getReplicationLogArchivingEnabled() + + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @return bool|null + */ + public function getReplicationLogArchivingEnabledUnwrapped() + { + return $this->readWrapperValue("replication_log_archiving_enabled"); + } + + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setReplicationLogArchivingEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->replication_log_archiving_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @param bool|null $var + * @return $this + */ + public function setReplicationLogArchivingEnabledUnwrapped($var) + { + $this->writeWrapperValue("replication_log_archiving_enabled", $var); + return $this;} + + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getPointInTimeRecoveryEnabled() + { + return $this->point_in_time_recovery_enabled; + } + + public function hasPointInTimeRecoveryEnabled() + { + return isset($this->point_in_time_recovery_enabled); + } + + public function clearPointInTimeRecoveryEnabled() + { + unset($this->point_in_time_recovery_enabled); + } + + /** + * Returns the unboxed value from getPointInTimeRecoveryEnabled() + + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @return bool|null + */ + public function getPointInTimeRecoveryEnabledUnwrapped() + { + return $this->readWrapperValue("point_in_time_recovery_enabled"); + } + + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setPointInTimeRecoveryEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->point_in_time_recovery_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @param bool|null $var + * @return $this + */ + public function setPointInTimeRecoveryEnabledUnwrapped($var) + { + $this->writeWrapperValue("point_in_time_recovery_enabled", $var); + return $this;} + + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; + * @return \Google\Cloud\Sql\V1\BackupRetentionSettings|null + */ + public function getBackupRetentionSettings() + { + return $this->backup_retention_settings; + } + + public function hasBackupRetentionSettings() + { + return isset($this->backup_retention_settings); + } + + public function clearBackupRetentionSettings() + { + unset($this->backup_retention_settings); + } + + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings backup_retention_settings = 8; + * @param \Google\Cloud\Sql\V1\BackupRetentionSettings $var + * @return $this + */ + public function setBackupRetentionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupRetentionSettings::class); + $this->backup_retention_settings = $var; + + return $this; + } + + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @return \Google\Protobuf\Int32Value|null + */ + public function getTransactionLogRetentionDays() + { + return $this->transaction_log_retention_days; + } + + public function hasTransactionLogRetentionDays() + { + return isset($this->transaction_log_retention_days); + } + + public function clearTransactionLogRetentionDays() + { + unset($this->transaction_log_retention_days); + } + + /** + * Returns the unboxed value from getTransactionLogRetentionDays() + + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @return int|null + */ + public function getTransactionLogRetentionDaysUnwrapped() + { + return $this->readWrapperValue("transaction_log_retention_days"); + } + + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setTransactionLogRetentionDays($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->transaction_log_retention_days = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @param int|null $var + * @return $this + */ + public function setTransactionLogRetentionDaysUnwrapped($var) + { + $this->writeWrapperValue("transaction_log_retention_days", $var); + return $this;} + + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0; + } + + public function hasTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state); + } + + public function clearTransactionalLogStorageState() + { + unset($this->transactional_log_storage_state); + } + + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransactionalLogStorageState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupConfiguration\TransactionalLogStorageState::class); + $this->transactional_log_storage_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php new file mode 100644 index 000000000000..212975cb48b2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupConfiguration/TransactionalLogStorageState.php @@ -0,0 +1,81 @@ +google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState + */ +class TransactionalLogStorageState +{ + /** + * Unspecified. + * + * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + */ + const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + /** + * The transaction logs for the instance are stored on a data disk. + * + * Generated from protobuf enum DISK = 1; + */ + const DISK = 1; + /** + * The transaction logs for the instance are switching from being stored on + * a data disk to being stored in Cloud Storage. + * + * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2; + */ + const SWITCHING_TO_CLOUD_STORAGE = 2; + /** + * The transaction logs for the instance are now stored in Cloud Storage. + * Previously, they were stored on a data disk. + * + * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3; + */ + const SWITCHED_TO_CLOUD_STORAGE = 3; + /** + * The transaction logs for the instance are stored in Cloud Storage. + * + * Generated from protobuf enum CLOUD_STORAGE = 4; + */ + const CLOUD_STORAGE = 4; + + private static $valueToName = [ + self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', + self::DISK => 'DISK', + self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE', + self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TransactionalLogStorageState::class, \Google\Cloud\Sql\V1\BackupConfiguration_TransactionalLogStorageState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php new file mode 100644 index 000000000000..961ce1b42aac --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupContext.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.BackupContext + */ +class BackupContext extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + */ + protected $backup_id = 0; + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $backup_id + * The identifier of the backup. + * @type string $kind + * This is always `sql#backupContext`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + * @return int|string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + * @param int|string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkInt64($var); + $this->backup_id = $var; + + return $this; + } + + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php new file mode 100644 index 000000000000..eab7ab57883d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig.php @@ -0,0 +1,121 @@ +google.cloud.sql.v1.BackupReencryptionConfig + */ +class BackupReencryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + */ + protected $backup_limit = null; + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; + */ + protected $backup_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $backup_limit + * Backup re-encryption limit + * @type int $backup_type + * Type of backups users want to re-encrypt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + * @return int + */ + public function getBackupLimit() + { + return isset($this->backup_limit) ? $this->backup_limit : 0; + } + + public function hasBackupLimit() + { + return isset($this->backup_limit); + } + + public function clearBackupLimit() + { + unset($this->backup_limit); + } + + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + * @param int $var + * @return $this + */ + public function setBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->backup_limit = $var; + + return $this; + } + + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; + * @return int + */ + public function getBackupType() + { + return isset($this->backup_type) ? $this->backup_type : 0; + } + + public function hasBackupType() + { + return isset($this->backup_type); + } + + public function clearBackupType() + { + unset($this->backup_type); + } + + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig.BackupType backup_type = 2; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupReencryptionConfig\BackupType::class); + $this->backup_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php new file mode 100644 index 000000000000..f72845f44ee1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupReencryptionConfig/BackupType.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.BackupReencryptionConfig.BackupType + */ +class BackupType +{ + /** + * Unknown backup type, will be defaulted to AUTOMATIC backup type + * + * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; + */ + const BACKUP_TYPE_UNSPECIFIED = 0; + /** + * Reencrypt automatic backups + * + * Generated from protobuf enum AUTOMATED = 1; + */ + const AUTOMATED = 1; + /** + * Reencrypt on-demand backups + * + * Generated from protobuf enum ON_DEMAND = 2; + */ + const ON_DEMAND = 2; + + private static $valueToName = [ + self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', + self::AUTOMATED => 'AUTOMATED', + self::ON_DEMAND => 'ON_DEMAND', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackupType::class, \Google\Cloud\Sql\V1\BackupReencryptionConfig_BackupType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php new file mode 100644 index 000000000000..74494506fb6c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings.php @@ -0,0 +1,151 @@ +google.cloud.sql.v1.BackupRetentionSettings + */ +class BackupRetentionSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; + */ + protected $retention_unit = 0; + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + */ + protected $retained_backups = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $retention_unit + * The unit that 'retained_backups' represents. + * @type \Google\Protobuf\Int32Value $retained_backups + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; + * @return int + */ + public function getRetentionUnit() + { + return $this->retention_unit; + } + + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit retention_unit = 1; + * @param int $var + * @return $this + */ + public function setRetentionUnit($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupRetentionSettings\RetentionUnit::class); + $this->retention_unit = $var; + + return $this; + } + + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getRetainedBackups() + { + return $this->retained_backups; + } + + public function hasRetainedBackups() + { + return isset($this->retained_backups); + } + + public function clearRetainedBackups() + { + unset($this->retained_backups); + } + + /** + * Returns the unboxed value from getRetainedBackups() + + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @return int|null + */ + public function getRetainedBackupsUnwrapped() + { + return $this->readWrapperValue("retained_backups"); + } + + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setRetainedBackups($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->retained_backups = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @param int|null $var + * @return $this + */ + public function setRetainedBackupsUnwrapped($var) + { + $this->writeWrapperValue("retained_backups", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php new file mode 100644 index 000000000000..b1a12d681838 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRetentionSettings/RetentionUnit.php @@ -0,0 +1,57 @@ +google.cloud.sql.v1.BackupRetentionSettings.RetentionUnit + */ +class RetentionUnit +{ + /** + * Backup retention unit is unspecified, will be treated as COUNT. + * + * Generated from protobuf enum RETENTION_UNIT_UNSPECIFIED = 0; + */ + const RETENTION_UNIT_UNSPECIFIED = 0; + /** + * Retention will be by count, eg. "retain the most recent 7 backups". + * + * Generated from protobuf enum COUNT = 1; + */ + const COUNT = 1; + + private static $valueToName = [ + self::RETENTION_UNIT_UNSPECIFIED => 'RETENTION_UNIT_UNSPECIFIED', + self::COUNT => 'COUNT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetentionUnit::class, \Google\Cloud\Sql\V1\BackupRetentionSettings_RetentionUnit::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php new file mode 100644 index 000000000000..ac7add86874c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRun.php @@ -0,0 +1,733 @@ +google.cloud.sql.v1.BackupRun + */ +class BackupRun extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; + */ + protected $status = 0; + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + */ + protected $enqueued_time = null; + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + */ + protected $id = 0; + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + */ + protected $start_time = null; + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; + */ + protected $error = null; + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; + */ + protected $type = 0; + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + */ + protected $description = ''; + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + */ + protected $window_start_time = null; + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + */ + protected $self_link = ''; + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + */ + protected $location = ''; + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; + */ + protected $disk_encryption_configuration = null; + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; + */ + protected $disk_encryption_status = null; + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; + */ + protected $backup_kind = 0; + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + */ + protected $time_zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#backupRun`. + * @type int $status + * The status of this run. + * @type \Google\Protobuf\Timestamp $enqueued_time + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type int|string $id + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * @type \Google\Protobuf\Timestamp $start_time + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $end_time + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Cloud\Sql\V1\OperationError $error + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * @type int $type + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * @type string $description + * The description of this run, only applicable to on-demand backups. + * @type \Google\Protobuf\Timestamp $window_start_time + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * @type string $instance + * Name of the database instance. + * @type string $self_link + * The URI of this resource. + * @type string $location + * Location of the backups. + * @type \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $disk_encryption_configuration + * Encryption configuration specific to a backup. + * @type \Google\Cloud\Sql\V1\DiskEncryptionStatus $disk_encryption_status + * Encryption status specific to a backup. + * @type int $backup_kind + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * @type string $time_zone + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunStatus status = 2; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupRunStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEnqueuedTime() + { + return $this->enqueued_time; + } + + public function hasEnqueuedTime() + { + return isset($this->enqueued_time); + } + + public function clearEnqueuedTime() + { + unset($this->enqueued_time); + } + + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEnqueuedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->enqueued_time = $var; + + return $this; + } + + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @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); + } + + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @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); + } + + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; + * @return \Google\Cloud\Sql\V1\OperationError|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationError error = 7; + * @param \Google\Cloud\Sql\V1\OperationError $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OperationError::class); + $this->error = $var; + + return $this; + } + + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupRunType type = 8; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupRunType::class); + $this->type = $var; + + return $this; + } + + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getWindowStartTime() + { + return $this->window_start_time; + } + + public function hasWindowStartTime() + { + return isset($this->window_start_time); + } + + public function clearWindowStartTime() + { + unset($this->window_start_time); + } + + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setWindowStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->window_start_time = $var; + + return $this; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; + * @return \Google\Cloud\Sql\V1\DiskEncryptionConfiguration|null + */ + public function getDiskEncryptionConfiguration() + { + return $this->disk_encryption_configuration; + } + + public function hasDiskEncryptionConfiguration() + { + return isset($this->disk_encryption_configuration); + } + + public function clearDiskEncryptionConfiguration() + { + unset($this->disk_encryption_configuration); + } + + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 16; + * @param \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $var + * @return $this + */ + public function setDiskEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionConfiguration::class); + $this->disk_encryption_configuration = $var; + + return $this; + } + + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; + * @return \Google\Cloud\Sql\V1\DiskEncryptionStatus|null + */ + public function getDiskEncryptionStatus() + { + return $this->disk_encryption_status; + } + + public function hasDiskEncryptionStatus() + { + return isset($this->disk_encryption_status); + } + + public function clearDiskEncryptionStatus() + { + unset($this->disk_encryption_status); + } + + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 17; + * @param \Google\Cloud\Sql\V1\DiskEncryptionStatus $var + * @return $this + */ + public function setDiskEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionStatus::class); + $this->disk_encryption_status = $var; + + return $this; + } + + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; + * @return int + */ + public function getBackupKind() + { + return $this->backup_kind; + } + + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackupKind backup_kind = 19; + * @param int $var + * @return $this + */ + public function setBackupKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackupKind::class); + $this->backup_kind = $var; + + return $this; + } + + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php new file mode 100644 index 000000000000..9bbd7c75674f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BackupRunsListResponse.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1.BackupRunsListResponse + */ +class BackupRunsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#backupRunsList`. + * @type array<\Google\Cloud\Sql\V1\BackupRun>|\Google\Protobuf\Internal\RepeatedField $items + * A list of backup runs in reverse chronological order of the enqueued time. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.BackupRun items = 2; + * @param array<\Google\Cloud\Sql\V1\BackupRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\BackupRun::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php new file mode 100644 index 000000000000..490cd7ee7edb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BakType.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1.BakType + */ +class BakType +{ + /** + * Default type. + * + * Generated from protobuf enum BAK_TYPE_UNSPECIFIED = 0; + */ + const BAK_TYPE_UNSPECIFIED = 0; + /** + * Full backup. + * + * Generated from protobuf enum FULL = 1; + */ + const FULL = 1; + /** + * Differential backup. + * + * Generated from protobuf enum DIFF = 2; + */ + const DIFF = 2; + /** + * Transaction Log backup + * + * Generated from protobuf enum TLOG = 3; + */ + const TLOG = 3; + + private static $valueToName = [ + self::BAK_TYPE_UNSPECIFIED => 'BAK_TYPE_UNSPECIFIED', + self::FULL => 'FULL', + self::DIFF => 'DIFF', + self::TLOG => 'TLOG', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php new file mode 100644 index 000000000000..0cbd09e04f0b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/BinLogCoordinates.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.BinLogCoordinates + */ +class BinLogCoordinates extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + */ + protected $bin_log_file_name = ''; + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + */ + protected $bin_log_position = 0; + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bin_log_file_name + * Name of the binary log file for a Cloud SQL instance. + * @type int|string $bin_log_position + * Position (offset) within the binary log file. + * @type string $kind + * This is always `sql#binLogCoordinates`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + * @return string + */ + public function getBinLogFileName() + { + return $this->bin_log_file_name; + } + + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + * @param string $var + * @return $this + */ + public function setBinLogFileName($var) + { + GPBUtil::checkString($var, True); + $this->bin_log_file_name = $var; + + return $this; + } + + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + * @return int|string + */ + public function getBinLogPosition() + { + return $this->bin_log_position; + } + + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + * @param int|string $var + * @return $this + */ + public function setBinLogPosition($var) + { + GPBUtil::checkInt64($var); + $this->bin_log_position = $var; + + return $this; + } + + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php new file mode 100644 index 000000000000..c5263be341d6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/CloneContext.php @@ -0,0 +1,383 @@ +google.cloud.sql.v1.CloneContext + */ +class CloneContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + */ + protected $pitr_timestamp_ms = 0; + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + */ + protected $destination_instance_name = ''; + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; + */ + protected $bin_log_coordinates = null; + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + */ + protected $point_in_time = null; + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + */ + protected $allocated_ip_range = ''; + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + */ + private $database_names; + /** + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preferred_zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#cloneContext`. + * @type int|string $pitr_timestamp_ms + * Reserved for future use. + * @type string $destination_instance_name + * Name of the Cloud SQL instance to be created as a clone. + * @type \Google\Cloud\Sql\V1\BinLogCoordinates $bin_log_coordinates + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * @type \Google\Protobuf\Timestamp $point_in_time + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * @type string $allocated_ip_range + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * @type array|\Google\Protobuf\Internal\RepeatedField $database_names + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * @type string $preferred_zone + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + * @return int|string + */ + public function getPitrTimestampMs() + { + return $this->pitr_timestamp_ms; + } + + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + * @param int|string $var + * @return $this + */ + public function setPitrTimestampMs($var) + { + GPBUtil::checkInt64($var); + $this->pitr_timestamp_ms = $var; + + return $this; + } + + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + * @return string + */ + public function getDestinationInstanceName() + { + return $this->destination_instance_name; + } + + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + * @param string $var + * @return $this + */ + public function setDestinationInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->destination_instance_name = $var; + + return $this; + } + + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; + * @return \Google\Cloud\Sql\V1\BinLogCoordinates|null + */ + public function getBinLogCoordinates() + { + return $this->bin_log_coordinates; + } + + public function hasBinLogCoordinates() + { + return isset($this->bin_log_coordinates); + } + + public function clearBinLogCoordinates() + { + unset($this->bin_log_coordinates); + } + + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1.BinLogCoordinates bin_log_coordinates = 4; + * @param \Google\Cloud\Sql\V1\BinLogCoordinates $var + * @return $this + */ + public function setBinLogCoordinates($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BinLogCoordinates::class); + $this->bin_log_coordinates = $var; + + return $this; + } + + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPointInTime() + { + return $this->point_in_time; + } + + public function hasPointInTime() + { + return isset($this->point_in_time); + } + + public function clearPointInTime() + { + unset($this->point_in_time); + } + + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPointInTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->point_in_time = $var; + + return $this; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + * @return string + */ + public function getAllocatedIpRange() + { + return $this->allocated_ip_range; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + * @param string $var + * @return $this + */ + public function setAllocatedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->allocated_ip_range = $var; + + return $this; + } + + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabaseNames() + { + return $this->database_names; + } + + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabaseNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->database_names = $arr; + + return $this; + } + + /** + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPreferredZone() + { + return isset($this->preferred_zone) ? $this->preferred_zone : ''; + } + + public function hasPreferredZone() + { + return isset($this->preferred_zone); + } + + public function clearPreferredZone() + { + unset($this->preferred_zone); + } + + /** + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPreferredZone($var) + { + GPBUtil::checkString($var, True); + $this->preferred_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php new file mode 100644 index 000000000000..d99992870e13 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ConnectSettings.php @@ -0,0 +1,371 @@ +google.cloud.sql.v1.ConnectSettings + */ +class ConnectSettings extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; + */ + protected $server_ca_cert = null; + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; + */ + private $ip_addresses; + /** + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + */ + protected $region = ''; + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; + */ + protected $database_version = 0; + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; + */ + protected $backend_type = 0; + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + */ + protected $psc_enabled = false; + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + */ + protected $dns_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#connectSettings`. + * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert + * SSL configuration. + * @type array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * The assigned IP addresses for the instance. + * @type string $region + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * @type int $database_version + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * @type int $backend_type + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * @type bool $psc_enabled + * Whether PSC connectivity is enabled for this instance. + * @type string $dns_name + * The dns name of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 2; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 3; + * @param array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\IpMapping::class); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The cloud region for the instance. For example, `us-central1`, + * `europe-west1`. The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; + * @return int + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 31; + * @param int $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); + $this->database_version = $var; + + return $this; + } + + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 32; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + * @return bool + */ + public function getPscEnabled() + { + return $this->psc_enabled; + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + * @param bool $var + * @return $this + */ + public function setPscEnabled($var) + { + GPBUtil::checkBool($var); + $this->psc_enabled = $var; + + return $this; + } + + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + * @return string + */ + public function getDnsName() + { + return $this->dns_name; + } + + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + * @param string $var + * @return $this + */ + public function setDnsName($var) + { + GPBUtil::checkString($var, True); + $this->dns_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php new file mode 100644 index 000000000000..64063925f8c6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DataCacheConfig.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.DataCacheConfig + */ +class DataCacheConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + */ + protected $data_cache_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $data_cache_enabled + * Whether data cache is enabled for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + * @return bool + */ + public function getDataCacheEnabled() + { + return $this->data_cache_enabled; + } + + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + * @param bool $var + * @return $this + */ + public function setDataCacheEnabled($var) + { + GPBUtil::checkBool($var); + $this->data_cache_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php new file mode 100644 index 000000000000..820ce4a13ffe --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Database.php @@ -0,0 +1,354 @@ +google.cloud.sql.v1.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + */ + protected $charset = ''; + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + */ + protected $collation = ''; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + */ + protected $name = ''; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + */ + protected $self_link = ''; + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + */ + protected $project = ''; + protected $database_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#database`. + * @type string $charset + * The Cloud SQL charset value. + * @type string $collation + * The Cloud SQL collation value. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. + * @type string $name + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * @type string $instance + * The name of the Cloud SQL instance. This does not include the project ID. + * @type string $self_link + * The URI of this resource. + * @type string $project + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * @type \Google\Cloud\Sql\V1\SqlServerDatabaseDetails $sqlserver_database_details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + * @return string + */ + public function getCharset() + { + return $this->charset; + } + + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + * @param string $var + * @return $this + */ + public function setCharset($var) + { + GPBUtil::checkString($var, True); + $this->charset = $var; + + return $this; + } + + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9; + * @return \Google\Cloud\Sql\V1\SqlServerDatabaseDetails|null + */ + public function getSqlserverDatabaseDetails() + { + return $this->readOneof(9); + } + + public function hasSqlserverDatabaseDetails() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerDatabaseDetails sqlserver_database_details = 9; + * @param \Google\Cloud\Sql\V1\SqlServerDatabaseDetails $var + * @return $this + */ + public function setSqlserverDatabaseDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerDatabaseDetails::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getDatabaseDetails() + { + return $this->whichOneof("database_details"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php new file mode 100644 index 000000000000..6ff8e5bfce63 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseFlags.php @@ -0,0 +1,125 @@ +google.cloud.sql.v1.DatabaseFlags + */ +class DatabaseFlags extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * @type string $value + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php new file mode 100644 index 000000000000..1d2737cd6b43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance.php @@ -0,0 +1,1965 @@ +google.cloud.sql.v1.DatabaseInstance + */ +class DatabaseInstance extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; + */ + protected $state = 0; + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; + */ + protected $database_version = 0; + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; + */ + protected $settings = null; + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + */ + protected $etag = ''; + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + */ + protected $failover_replica = null; + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + */ + protected $master_instance_name = ''; + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + */ + private $replica_names; + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @deprecated + */ + protected $max_disk_size = null; + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @deprecated + */ + protected $current_disk_size = null; + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; + */ + private $ip_addresses; + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; + */ + protected $server_ca_cert = null; + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; + */ + protected $instance_type = 0; + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + */ + protected $project = ''; + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @deprecated + */ + protected $ipv6_address = ''; + /** + * The service account email address assigned to the instance.\This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + */ + protected $service_account_email_address = ''; + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; + */ + protected $on_premises_configuration = null; + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; + */ + protected $replica_configuration = null; + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; + */ + protected $backend_type = 0; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + */ + protected $self_link = ''; + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; + */ + private $suspension_reason; + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + */ + protected $connection_name = ''; + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + */ + protected $name = ''; + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + */ + protected $region = ''; + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + */ + protected $gce_zone = ''; + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + */ + protected $secondary_gce_zone = ''; + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; + */ + protected $disk_encryption_configuration = null; + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; + */ + protected $disk_encryption_status = null; + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + */ + protected $root_password = ''; + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + */ + protected $scheduled_maintenance = null; + /** + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + */ + protected $satisfies_pzs = null; + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_installed_version = ''; + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + */ + protected $out_of_disk_report = null; + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_maintenance_versions; + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + */ + protected $maintenance_version = ''; + /** + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + */ + protected $sql_network_architecture = null; + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_service_attachment_link = null; + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dns_name = null; + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $primary_dns_name = null; + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $write_endpoint = null; + /** + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replication_cluster = null; + /** + * Gemini configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + */ + protected $gemini_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#instance`. + * @type int $state + * The current serving state of the Cloud SQL instance. + * @type int $database_version + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * @type \Google\Cloud\Sql\V1\Settings $settings + * The user settings. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica $failover_replica + * The name and status of the failover replica. + * @type string $master_instance_name + * The name of the instance which will act as primary in the replication + * setup. + * @type array|\Google\Protobuf\Internal\RepeatedField $replica_names + * The replicas of the instance. + * @type \Google\Protobuf\Int64Value $max_disk_size + * The maximum disk size of the instance in bytes. + * @type \Google\Protobuf\Int64Value $current_disk_size + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * @type array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * The assigned IP addresses for the instance. + * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert + * SSL configuration. + * @type int $instance_type + * The instance type. + * @type string $project + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * @type string $ipv6_address + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * @type string $service_account_email_address + * The service account email address assigned to the instance.\This + * property is read-only. + * @type \Google\Cloud\Sql\V1\OnPremisesConfiguration $on_premises_configuration + * Configuration specific to on-premises instances. + * @type \Google\Cloud\Sql\V1\ReplicaConfiguration $replica_configuration + * Configuration specific to failover replicas and read replicas. + * @type int $backend_type + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * @type string $self_link + * The URI of this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $suspension_reason + * If the instance state is SUSPENDED, the reason for the suspension. + * @type string $connection_name + * Connection name of the Cloud SQL instance used in connection strings. + * @type string $name + * Name of the Cloud SQL instance. This does not include the project ID. + * @type string $region + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * @type string $gce_zone + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * @type string $secondary_gce_zone + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * @type \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $disk_encryption_configuration + * Disk encryption configuration specific to an instance. + * @type \Google\Cloud\Sql\V1\DiskEncryptionStatus $disk_encryption_status + * Disk encryption status specific to an instance. + * @type string $root_password + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance $scheduled_maintenance + * The start time of any upcoming scheduled maintenance for this instance. + * @type \Google\Protobuf\BoolValue $satisfies_pzs + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * @type string $database_installed_version + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * @type \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport $out_of_disk_report + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_maintenance_versions + * Output only. List all maintenance versions applicable on the instance + * @type string $maintenance_version + * The current software version on the instance. + * @type int $sql_network_architecture + * @type string $psc_service_attachment_link + * Output only. The link to service attachment of PSC instance. + * @type string $dns_name + * Output only. The dns name of the instance. + * @type string $primary_dns_name + * Output only. DEPRECATED: please use write_endpoint instead. + * @type string $write_endpoint + * Output only. The dns name of the primary instance in a replication group. + * @type \Google\Cloud\Sql\V1\ReplicationCluster $replication_cluster + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * @type \Google\Cloud\Sql\V1\GeminiInstanceConfig $gemini_config + * Gemini configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlInstanceState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlInstanceState::class); + $this->state = $var; + + return $this; + } + + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; + * @return int + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDatabaseVersion database_version = 3; + * @param int $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); + $this->database_version = $var; + + return $this; + } + + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; + * @return \Google\Cloud\Sql\V1\Settings|null + */ + public function getSettings() + { + return $this->settings; + } + + public function hasSettings() + { + return isset($this->settings); + } + + public function clearSettings() + { + unset($this->settings); + } + + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings settings = 4; + * @param \Google\Cloud\Sql\V1\Settings $var + * @return $this + */ + public function setSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Settings::class); + $this->settings = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica|null + */ + public function getFailoverReplica() + { + return $this->failover_replica; + } + + public function hasFailoverReplica() + { + return isset($this->failover_replica); + } + + public function clearFailoverReplica() + { + unset($this->failover_replica); + } + + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica $var + * @return $this + */ + public function setFailoverReplica($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlFailoverReplica::class); + $this->failover_replica = $var; + + return $this; + } + + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + * @return string + */ + public function getMasterInstanceName() + { + return $this->master_instance_name; + } + + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + * @param string $var + * @return $this + */ + public function setMasterInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->master_instance_name = $var; + + return $this; + } + + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicaNames() + { + return $this->replica_names; + } + + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicaNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->replica_names = $arr; + + return $this; + } + + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @return \Google\Protobuf\Int64Value|null + * @deprecated + */ + public function getMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->max_disk_size; + } + + public function hasMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return isset($this->max_disk_size); + } + + public function clearMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + unset($this->max_disk_size); + } + + /** + * Returns the unboxed value from getMaxDiskSize() + + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @return int|string|null + */ + public function getMaxDiskSizeUnwrapped() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("max_disk_size"); + } + + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + * @deprecated + */ + public function setMaxDiskSize($var) + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_disk_size = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @param int|string|null $var + * @return $this + */ + public function setMaxDiskSizeUnwrapped($var) + { + $this->writeWrapperValue("max_disk_size", $var); + return $this;} + + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @return \Google\Protobuf\Int64Value|null + * @deprecated + */ + public function getCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->current_disk_size; + } + + public function hasCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return isset($this->current_disk_size); + } + + public function clearCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + unset($this->current_disk_size); + } + + /** + * Returns the unboxed value from getCurrentDiskSize() + + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @return int|string|null + */ + public function getCurrentDiskSizeUnwrapped() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("current_disk_size"); + } + + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + * @deprecated + */ + public function setCurrentDiskSize($var) + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->current_disk_size = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @param int|string|null $var + * @return $this + */ + public function setCurrentDiskSizeUnwrapped($var) + { + $this->writeWrapperValue("current_disk_size", $var); + return $this;} + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.IpMapping ip_addresses = 11; + * @param array<\Google\Cloud\Sql\V1\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\IpMapping::class); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 12; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; + * @return int + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstanceType instance_type = 13; + * @param int $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstanceType::class); + $this->instance_type = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @return string + * @deprecated + */ + public function getIpv6Address() + { + @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); + return $this->ipv6_address; + } + + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setIpv6Address($var) + { + @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->ipv6_address = $var; + + return $this; + } + + /** + * The service account email address assigned to the instance.\This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + * @return string + */ + public function getServiceAccountEmailAddress() + { + return $this->service_account_email_address; + } + + /** + * The service account email address assigned to the instance.\This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + * @param string $var + * @return $this + */ + public function setServiceAccountEmailAddress($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email_address = $var; + + return $this; + } + + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; + * @return \Google\Cloud\Sql\V1\OnPremisesConfiguration|null + */ + public function getOnPremisesConfiguration() + { + return $this->on_premises_configuration; + } + + public function hasOnPremisesConfiguration() + { + return isset($this->on_premises_configuration); + } + + public function clearOnPremisesConfiguration() + { + unset($this->on_premises_configuration); + } + + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1.OnPremisesConfiguration on_premises_configuration = 17; + * @param \Google\Cloud\Sql\V1\OnPremisesConfiguration $var + * @return $this + */ + public function setOnPremisesConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OnPremisesConfiguration::class); + $this->on_premises_configuration = $var; + + return $this; + } + + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; + * @return \Google\Cloud\Sql\V1\ReplicaConfiguration|null + */ + public function getReplicaConfiguration() + { + return $this->replica_configuration; + } + + public function hasReplicaConfiguration() + { + return isset($this->replica_configuration); + } + + public function clearReplicaConfiguration() + { + unset($this->replica_configuration); + } + + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicaConfiguration replica_configuration = 18; + * @param \Google\Cloud\Sql\V1\ReplicaConfiguration $var + * @return $this + */ + public function setReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicaConfiguration::class); + $this->replica_configuration = $var; + + return $this; + } + + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlBackendType backend_type = 19; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlBackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSuspensionReason() + { + return $this->suspension_reason; + } + + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlSuspensionReason suspension_reason = 21; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSuspensionReason($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1\SqlSuspensionReason::class); + $this->suspension_reason = $arr; + + return $this; + } + + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + * @return string + */ + public function getConnectionName() + { + return $this->connection_name; + } + + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + * @param string $var + * @return $this + */ + public function setConnectionName($var) + { + GPBUtil::checkString($var, True); + $this->connection_name = $var; + + return $this; + } + + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + * @return string + */ + public function getGceZone() + { + return $this->gce_zone; + } + + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + * @param string $var + * @return $this + */ + public function setGceZone($var) + { + GPBUtil::checkString($var, True); + $this->gce_zone = $var; + + return $this; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + * @return string + */ + public function getSecondaryGceZone() + { + return $this->secondary_gce_zone; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + * @param string $var + * @return $this + */ + public function setSecondaryGceZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_gce_zone = $var; + + return $this; + } + + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; + * @return \Google\Cloud\Sql\V1\DiskEncryptionConfiguration|null + */ + public function getDiskEncryptionConfiguration() + { + return $this->disk_encryption_configuration; + } + + public function hasDiskEncryptionConfiguration() + { + return isset($this->disk_encryption_configuration); + } + + public function clearDiskEncryptionConfiguration() + { + unset($this->disk_encryption_configuration); + } + + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionConfiguration disk_encryption_configuration = 26; + * @param \Google\Cloud\Sql\V1\DiskEncryptionConfiguration $var + * @return $this + */ + public function setDiskEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionConfiguration::class); + $this->disk_encryption_configuration = $var; + + return $this; + } + + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; + * @return \Google\Cloud\Sql\V1\DiskEncryptionStatus|null + */ + public function getDiskEncryptionStatus() + { + return $this->disk_encryption_status; + } + + public function hasDiskEncryptionStatus() + { + return isset($this->disk_encryption_status); + } + + public function clearDiskEncryptionStatus() + { + unset($this->disk_encryption_status); + } + + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DiskEncryptionStatus disk_encryption_status = 27; + * @param \Google\Cloud\Sql\V1\DiskEncryptionStatus $var + * @return $this + */ + public function setDiskEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DiskEncryptionStatus::class); + $this->disk_encryption_status = $var; + + return $this; + } + + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + * @return string + */ + public function getRootPassword() + { + return $this->root_password; + } + + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + * @param string $var + * @return $this + */ + public function setRootPassword($var) + { + GPBUtil::checkString($var, True); + $this->root_password = $var; + + return $this; + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance|null + */ + public function getScheduledMaintenance() + { + return $this->scheduled_maintenance; + } + + public function hasScheduledMaintenance() + { + return isset($this->scheduled_maintenance); + } + + public function clearScheduledMaintenance() + { + unset($this->scheduled_maintenance); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance $var + * @return $this + */ + public function setScheduledMaintenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlScheduledMaintenance::class); + $this->scheduled_maintenance = $var; + + return $this; + } + + /** + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Returns the unboxed value from getSatisfiesPzs() + + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @return bool|null + */ + public function getSatisfiesPzsUnwrapped() + { + return $this->readWrapperValue("satisfies_pzs"); + } + + /** + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @param bool|null $var + * @return $this + */ + public function setSatisfiesPzsUnwrapped($var) + { + $this->writeWrapperValue("satisfies_pzs", $var); + return $this;} + + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseInstalledVersion() + { + return $this->database_installed_version; + } + + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseInstalledVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_installed_version = $var; + + return $this; + } + + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + * @return \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport|null + */ + public function getOutOfDiskReport() + { + return $this->out_of_disk_report; + } + + public function hasOutOfDiskReport() + { + return isset($this->out_of_disk_report); + } + + public function clearOutOfDiskReport() + { + unset($this->out_of_disk_report); + } + + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + * @param \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport $var + * @return $this + */ + public function setOutOfDiskReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport::class); + $this->out_of_disk_report = $var; + + return $this; + } + + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.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 instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.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. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAvailableMaintenanceVersions() + { + return $this->available_maintenance_versions; + } + + /** + * Output only. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAvailableMaintenanceVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->available_maintenance_versions = $arr; + + return $this; + } + + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + * @return string + */ + public function getMaintenanceVersion() + { + return $this->maintenance_version; + } + + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + * @param string $var + * @return $this + */ + public function setMaintenanceVersion($var) + { + GPBUtil::checkString($var, True); + $this->maintenance_version = $var; + + return $this; + } + + /** + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + * @return int + */ + public function getSqlNetworkArchitecture() + { + return isset($this->sql_network_architecture) ? $this->sql_network_architecture : 0; + } + + public function hasSqlNetworkArchitecture() + { + return isset($this->sql_network_architecture); + } + + public function clearSqlNetworkArchitecture() + { + unset($this->sql_network_architecture); + } + + /** + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + * @param int $var + * @return $this + */ + public function setSqlNetworkArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlNetworkArchitecture::class); + $this->sql_network_architecture = $var; + + return $this; + } + + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPscServiceAttachmentLink() + { + return isset($this->psc_service_attachment_link) ? $this->psc_service_attachment_link : ''; + } + + public function hasPscServiceAttachmentLink() + { + return isset($this->psc_service_attachment_link); + } + + public function clearPscServiceAttachmentLink() + { + unset($this->psc_service_attachment_link); + } + + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPscServiceAttachmentLink($var) + { + GPBUtil::checkString($var, True); + $this->psc_service_attachment_link = $var; + + return $this; + } + + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDnsName() + { + return isset($this->dns_name) ? $this->dns_name : ''; + } + + public function hasDnsName() + { + return isset($this->dns_name); + } + + public function clearDnsName() + { + unset($this->dns_name); + } + + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDnsName($var) + { + GPBUtil::checkString($var, True); + $this->dns_name = $var; + + return $this; + } + + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + return isset($this->primary_dns_name) ? $this->primary_dns_name : ''; + } + + public function hasPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + return isset($this->primary_dns_name); + } + + public function clearPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + unset($this->primary_dns_name); + } + + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPrimaryDnsName($var) + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->primary_dns_name = $var; + + return $this; + } + + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWriteEndpoint() + { + return isset($this->write_endpoint) ? $this->write_endpoint : ''; + } + + public function hasWriteEndpoint() + { + return isset($this->write_endpoint); + } + + public function clearWriteEndpoint() + { + unset($this->write_endpoint); + } + + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWriteEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->write_endpoint = $var; + + return $this; + } + + /** + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ReplicationCluster|null + */ + public function getReplicationCluster() + { + return $this->replication_cluster; + } + + public function hasReplicationCluster() + { + return isset($this->replication_cluster); + } + + public function clearReplicationCluster() + { + unset($this->replication_cluster); + } + + /** + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ReplicationCluster $var + * @return $this + */ + public function setReplicationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicationCluster::class); + $this->replication_cluster = $var; + + return $this; + } + + /** + * Gemini configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + * @return \Google\Cloud\Sql\V1\GeminiInstanceConfig|null + */ + public function getGeminiConfig() + { + return $this->gemini_config; + } + + public function hasGeminiConfig() + { + return isset($this->gemini_config); + } + + public function clearGeminiConfig() + { + unset($this->gemini_config); + } + + /** + * Gemini configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + * @param \Google\Cloud\Sql\V1\GeminiInstanceConfig $var + * @return $this + */ + public function setGeminiConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\GeminiInstanceConfig::class); + $this->gemini_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php new file mode 100644 index 000000000000..ee7d98530190 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlFailoverReplica.php @@ -0,0 +1,159 @@ +google.cloud.sql.v1.DatabaseInstance.SqlFailoverReplica + */ +class SqlFailoverReplica extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + */ + protected $available = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * @type \Google\Protobuf\BoolValue $available + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getAvailable() + { + return $this->available; + } + + public function hasAvailable() + { + return isset($this->available); + } + + public function clearAvailable() + { + unset($this->available); + } + + /** + * Returns the unboxed value from getAvailable() + + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @return bool|null + */ + public function getAvailableUnwrapped() + { + return $this->readWrapperValue("available"); + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setAvailable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->available = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @param bool|null $var + * @return $this + */ + public function setAvailableUnwrapped($var) + { + $this->writeWrapperValue("available", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlFailoverReplica::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlFailoverReplica::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php new file mode 100644 index 000000000000..a4a61d210edb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlInstanceState.php @@ -0,0 +1,100 @@ +google.cloud.sql.v1.DatabaseInstance.SqlInstanceState + */ +class SqlInstanceState +{ + /** + * The state of the instance is unknown. + * + * Generated from protobuf enum SQL_INSTANCE_STATE_UNSPECIFIED = 0; + */ + const SQL_INSTANCE_STATE_UNSPECIFIED = 0; + /** + * The instance is running, or has been stopped by owner. + * + * Generated from protobuf enum RUNNABLE = 1; + */ + const RUNNABLE = 1; + /** + * The instance is not available, for example due to problems with billing. + * + * Generated from protobuf enum SUSPENDED = 2; + */ + const SUSPENDED = 2; + /** + * The instance is being deleted. + * + * Generated from protobuf enum PENDING_DELETE = 3; + */ + const PENDING_DELETE = 3; + /** + * The instance is being created. + * + * Generated from protobuf enum PENDING_CREATE = 4; + */ + const PENDING_CREATE = 4; + /** + * The instance is down for maintenance. + * + * Generated from protobuf enum MAINTENANCE = 5; + */ + const MAINTENANCE = 5; + /** + * The creation of the instance failed or a fatal error occurred during + * maintenance. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Deprecated + * + * Generated from protobuf enum ONLINE_MAINTENANCE = 7 [deprecated = true]; + */ + const ONLINE_MAINTENANCE = 7; + + private static $valueToName = [ + self::SQL_INSTANCE_STATE_UNSPECIFIED => 'SQL_INSTANCE_STATE_UNSPECIFIED', + self::RUNNABLE => 'RUNNABLE', + self::SUSPENDED => 'SUSPENDED', + self::PENDING_DELETE => 'PENDING_DELETE', + self::PENDING_CREATE => 'PENDING_CREATE', + self::MAINTENANCE => 'MAINTENANCE', + self::FAILED => 'FAILED', + self::ONLINE_MAINTENANCE => 'ONLINE_MAINTENANCE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlInstanceState::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlInstanceState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php new file mode 100644 index 000000000000..78fb88c614f8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlNetworkArchitecture.php @@ -0,0 +1,62 @@ +google.cloud.sql.v1.DatabaseInstance.SqlNetworkArchitecture + */ +class SqlNetworkArchitecture +{ + /** + * Generated from protobuf enum SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + */ + const SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The instance uses the new network architecture. + * + * Generated from protobuf enum NEW_NETWORK_ARCHITECTURE = 1; + */ + const NEW_NETWORK_ARCHITECTURE = 1; + /** + * The instance uses the old network architecture. + * + * Generated from protobuf enum OLD_NETWORK_ARCHITECTURE = 2; + */ + const OLD_NETWORK_ARCHITECTURE = 2; + + private static $valueToName = [ + self::SQL_NETWORK_ARCHITECTURE_UNSPECIFIED => 'SQL_NETWORK_ARCHITECTURE_UNSPECIFIED', + self::NEW_NETWORK_ARCHITECTURE => 'NEW_NETWORK_ARCHITECTURE', + self::OLD_NETWORK_ARCHITECTURE => 'OLD_NETWORK_ARCHITECTURE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlNetworkArchitecture::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlNetworkArchitecture::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php new file mode 100644 index 000000000000..8e07020085dd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport.php @@ -0,0 +1,160 @@ +google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport + */ +class SqlOutOfDiskReport extends \Google\Protobuf\Internal\Message +{ + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + */ + protected $sql_out_of_disk_state = null; + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + */ + protected $sql_min_recommended_increase_size_gb = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $sql_out_of_disk_state + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * @type int $sql_min_recommended_increase_size_gb + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + * @return int + */ + public function getSqlOutOfDiskState() + { + return isset($this->sql_out_of_disk_state) ? $this->sql_out_of_disk_state : 0; + } + + public function hasSqlOutOfDiskState() + { + return isset($this->sql_out_of_disk_state); + } + + public function clearSqlOutOfDiskState() + { + unset($this->sql_out_of_disk_state); + } + + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + * @param int $var + * @return $this + */ + public function setSqlOutOfDiskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\DatabaseInstance\SqlOutOfDiskReport\SqlOutOfDiskState::class); + $this->sql_out_of_disk_state = $var; + + return $this; + } + + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + * @return int + */ + public function getSqlMinRecommendedIncreaseSizeGb() + { + return isset($this->sql_min_recommended_increase_size_gb) ? $this->sql_min_recommended_increase_size_gb : 0; + } + + public function hasSqlMinRecommendedIncreaseSizeGb() + { + return isset($this->sql_min_recommended_increase_size_gb); + } + + public function clearSqlMinRecommendedIncreaseSizeGb() + { + unset($this->sql_min_recommended_increase_size_gb); + } + + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + * @param int $var + * @return $this + */ + public function setSqlMinRecommendedIncreaseSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->sql_min_recommended_increase_size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOutOfDiskReport::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlOutOfDiskReport::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php new file mode 100644 index 000000000000..5138c1304df8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState + */ +class SqlOutOfDiskState +{ + /** + * Unspecified state + * + * Generated from protobuf enum SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; + */ + const SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; + /** + * The instance has plenty space on data disk + * + * Generated from protobuf enum NORMAL = 1; + */ + const NORMAL = 1; + /** + * Data disk is almost used up. It is shutdown to prevent data + * corruption. + * + * Generated from protobuf enum SOFT_SHUTDOWN = 2; + */ + const SOFT_SHUTDOWN = 2; + + private static $valueToName = [ + self::SQL_OUT_OF_DISK_STATE_UNSPECIFIED => 'SQL_OUT_OF_DISK_STATE_UNSPECIFIED', + self::NORMAL => 'NORMAL', + self::SOFT_SHUTDOWN => 'SOFT_SHUTDOWN', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOutOfDiskState::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlOutOfDiskReport_SqlOutOfDiskState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php new file mode 100644 index 000000000000..100d09af9e5a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabaseInstance/SqlScheduledMaintenance.php @@ -0,0 +1,190 @@ +google.cloud.sql.v1.DatabaseInstance.SqlScheduledMaintenance + */ +class SqlScheduledMaintenance extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @deprecated + */ + protected $can_defer = false; + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + */ + protected $can_reschedule = false; + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + */ + protected $schedule_deadline_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of any upcoming scheduled maintenance for this instance. + * @type bool $can_defer + * @type bool $can_reschedule + * If the scheduled maintenance can be rescheduled. + * @type \Google\Protobuf\Timestamp $schedule_deadline_time + * Maintenance cannot be rescheduled to start beyond this deadline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getCanDefer() + { + @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); + return $this->can_defer; + } + + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setCanDefer($var) + { + @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->can_defer = $var; + + return $this; + } + + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + * @return bool + */ + public function getCanReschedule() + { + return $this->can_reschedule; + } + + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + * @param bool $var + * @return $this + */ + public function setCanReschedule($var) + { + GPBUtil::checkBool($var); + $this->can_reschedule = $var; + + return $this; + } + + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleDeadlineTime() + { + return $this->schedule_deadline_time; + } + + public function hasScheduleDeadlineTime() + { + return isset($this->schedule_deadline_time); + } + + public function clearScheduleDeadlineTime() + { + unset($this->schedule_deadline_time); + } + + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleDeadlineTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_deadline_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlScheduledMaintenance::class, \Google\Cloud\Sql\V1\DatabaseInstance_SqlScheduledMaintenance::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php new file mode 100644 index 000000000000..aadf490102b2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DatabasesListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.DatabasesListResponse + */ +class DatabasesListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#databasesList`. + * @type array<\Google\Cloud\Sql\V1\Database>|\Google\Protobuf\Internal\RepeatedField $items + * List of database resources in the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Database items = 2; + * @param array<\Google\Cloud\Sql\V1\Database>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Database::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php new file mode 100644 index 000000000000..062b74cae1e8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteContext.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1.DemoteContext + */ +class DemoteContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_representative_instance_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteContext`. + * @type string $source_representative_instance_name + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceRepresentativeInstanceName() + { + return $this->source_representative_instance_name; + } + + /** + * Required. The name of the instance which acts as the on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceRepresentativeInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->source_representative_instance_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php new file mode 100644 index 000000000000..7a13ebe2beda --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterConfiguration.php @@ -0,0 +1,132 @@ +google.cloud.sql.v1.DemoteMasterConfiguration + */ +class DemoteMasterConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + */ + protected $mysql_replica_configuration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterConfiguration`. + * @type \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration $mysql_replica_configuration + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + * @return \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration|null + */ + public function getMysqlReplicaConfiguration() + { + return $this->mysql_replica_configuration; + } + + public function hasMysqlReplicaConfiguration() + { + return isset($this->mysql_replica_configuration); + } + + public function clearMysqlReplicaConfiguration() + { + unset($this->mysql_replica_configuration); + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + * @param \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration $var + * @return $this + */ + public function setMysqlReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterMySqlReplicaConfiguration::class); + $this->mysql_replica_configuration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php new file mode 100644 index 000000000000..89f01303456f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterContext.php @@ -0,0 +1,294 @@ +google.cloud.sql.v1.DemoteMasterContext + */ +class DemoteMasterContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + */ + protected $verify_gtid_consistency = null; + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + */ + protected $master_instance_name = ''; + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; + */ + protected $replica_configuration = null; + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + */ + protected $skip_replication_setup = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterContext`. + * @type \Google\Protobuf\BoolValue $verify_gtid_consistency + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * @type string $master_instance_name + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * @type \Google\Cloud\Sql\V1\DemoteMasterConfiguration $replica_configuration + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * @type bool $skip_replication_setup + * Flag to skip replication setup on the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getVerifyGtidConsistency() + { + return $this->verify_gtid_consistency; + } + + public function hasVerifyGtidConsistency() + { + return isset($this->verify_gtid_consistency); + } + + public function clearVerifyGtidConsistency() + { + unset($this->verify_gtid_consistency); + } + + /** + * Returns the unboxed value from getVerifyGtidConsistency() + + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @return bool|null + */ + public function getVerifyGtidConsistencyUnwrapped() + { + return $this->readWrapperValue("verify_gtid_consistency"); + } + + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setVerifyGtidConsistency($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->verify_gtid_consistency = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @param bool|null $var + * @return $this + */ + public function setVerifyGtidConsistencyUnwrapped($var) + { + $this->writeWrapperValue("verify_gtid_consistency", $var); + return $this;} + + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + * @return string + */ + public function getMasterInstanceName() + { + return $this->master_instance_name; + } + + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + * @param string $var + * @return $this + */ + public function setMasterInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->master_instance_name = $var; + + return $this; + } + + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; + * @return \Google\Cloud\Sql\V1\DemoteMasterConfiguration|null + */ + public function getReplicaConfiguration() + { + return $this->replica_configuration; + } + + public function hasReplicaConfiguration() + { + return isset($this->replica_configuration); + } + + public function clearReplicaConfiguration() + { + unset($this->replica_configuration); + } + + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterConfiguration replica_configuration = 4; + * @param \Google\Cloud\Sql\V1\DemoteMasterConfiguration $var + * @return $this + */ + public function setReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterConfiguration::class); + $this->replica_configuration = $var; + + return $this; + } + + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + * @return bool + */ + public function getSkipReplicationSetup() + { + return $this->skip_replication_setup; + } + + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + * @param bool $var + * @return $this + */ + public function setSkipReplicationSetup($var) + { + GPBUtil::checkBool($var); + $this->skip_replication_setup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php new file mode 100644 index 000000000000..3c5d89aa32d2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DemoteMasterMySqlReplicaConfiguration.php @@ -0,0 +1,245 @@ +google.cloud.sql.v1.DemoteMasterMySqlReplicaConfiguration + */ +class DemoteMasterMySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + */ + protected $password = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + */ + protected $client_key = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + */ + protected $client_certificate = ''; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + */ + protected $ca_certificate = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * @type string $username + * The username for the replication connection. + * @type string $password + * The password for the replication connection. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php new file mode 100644 index 000000000000..74bae8b5cfdb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DenyMaintenancePeriod.php @@ -0,0 +1,164 @@ +google.cloud.sql.v1.DenyMaintenancePeriod + */ +class DenyMaintenancePeriod extends \Google\Protobuf\Internal\Message +{ + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + */ + protected $start_date = ''; + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + */ + protected $end_date = ''; + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + */ + protected $time = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_date + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * @type string $end_date + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * @type string $time + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + * @return string + */ + public function getStartDate() + { + return $this->start_date; + } + + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + * @param string $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkString($var, True); + $this->start_date = $var; + + return $this; + } + + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + * @return string + */ + public function getEndDate() + { + return $this->end_date; + } + + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * no maintenance interval recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + * @param string $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkString($var, True); + $this->end_date = $var; + + return $this; + } + + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + * @return string + */ + public function getTime() + { + return $this->time; + } + + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + * @param string $var + * @return $this + */ + public function setTime($var) + { + GPBUtil::checkString($var, True); + $this->time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php new file mode 100644 index 000000000000..cc5e86839a03 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionConfiguration.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.DiskEncryptionConfiguration + */ +class DiskEncryptionConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + */ + protected $kms_key_name = ''; + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Resource name of KMS key for disk encryption + * @type string $kind + * This is always `sql#diskEncryptionConfiguration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php new file mode 100644 index 000000000000..9d2eb56e3d7e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/DiskEncryptionStatus.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.DiskEncryptionStatus + */ +class DiskEncryptionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + */ + protected $kms_key_version_name = ''; + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_version_name + * KMS key version used to encrypt the Cloud SQL instance resource + * @type string $kind + * This is always `sql#diskEncryptionStatus`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + * @return string + */ + public function getKmsKeyVersionName() + { + return $this->kms_key_version_name; + } + + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_name = $var; + + return $this; + } + + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php new file mode 100644 index 000000000000..829e466796b3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext.php @@ -0,0 +1,436 @@ +google.cloud.sql.v1.ExportContext + */ +class ExportContext extends \Google\Protobuf\Internal\Message +{ + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + */ + private $databases; + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; + */ + protected $sql_export_options = null; + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; + */ + protected $csv_export_options = null; + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; + */ + protected $file_type = 0; + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + */ + protected $offload = null; + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; + */ + protected $bak_export_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * @type array|\Google\Protobuf\Internal\RepeatedField $databases + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * @type string $kind + * This is always `sql#exportContext`. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions $sql_export_options + * Options for exporting data as SQL statements. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions $csv_export_options + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * @type int $file_type + * The file type for the specified uri. + * @type \Google\Protobuf\BoolValue $offload + * Option for export offload. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions $bak_export_options + * Options for exporting data as BAK files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabases() + { + return $this->databases; + } + + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->databases = $arr; + + return $this; + } + + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions|null + */ + public function getSqlExportOptions() + { + return $this->sql_export_options; + } + + public function hasSqlExportOptions() + { + return isset($this->sql_export_options); + } + + public function clearSqlExportOptions() + { + unset($this->sql_export_options); + } + + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions sql_export_options = 4; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions $var + * @return $this + */ + public function setSqlExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions::class); + $this->sql_export_options = $var; + + return $this; + } + + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions|null + */ + public function getCsvExportOptions() + { + return $this->csv_export_options; + } + + public function hasCsvExportOptions() + { + return isset($this->csv_export_options); + } + + public function clearCsvExportOptions() + { + unset($this->csv_export_options); + } + + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlCsvExportOptions csv_export_options = 5; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions $var + * @return $this + */ + public function setCsvExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlCsvExportOptions::class); + $this->csv_export_options = $var; + + return $this; + } + + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; + * @return int + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 6; + * @param int $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFileType::class); + $this->file_type = $var; + + return $this; + } + + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @return \Google\Protobuf\BoolValue|null + */ + public function getOffload() + { + return $this->offload; + } + + public function hasOffload() + { + return isset($this->offload); + } + + public function clearOffload() + { + unset($this->offload); + } + + /** + * Returns the unboxed value from getOffload() + + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @return bool|null + */ + public function getOffloadUnwrapped() + { + return $this->readWrapperValue("offload"); + } + + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setOffload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->offload = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @param bool|null $var + * @return $this + */ + public function setOffloadUnwrapped($var) + { + $this->writeWrapperValue("offload", $var); + return $this;} + + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions|null + */ + public function getBakExportOptions() + { + return $this->bak_export_options; + } + + public function hasBakExportOptions() + { + return isset($this->bak_export_options); + } + + public function clearBakExportOptions() + { + unset($this->bak_export_options); + } + + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlBakExportOptions bak_export_options = 9; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions $var + * @return $this + */ + public function setBakExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlBakExportOptions::class); + $this->bak_export_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php new file mode 100644 index 000000000000..9eebf409ce5f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlBakExportOptions.php @@ -0,0 +1,380 @@ +google.cloud.sql.v1.ExportContext.SqlBakExportOptions + */ +class SqlBakExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + */ + protected $striped = null; + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + */ + protected $stripe_count = null; + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; + */ + protected $bak_type = 0; + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @deprecated + */ + protected $copy_only = null; + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + */ + protected $differential_base = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $striped + * Whether or not the export should be striped. + * @type \Google\Protobuf\Int32Value $stripe_count + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * @type int $bak_type + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * @type \Google\Protobuf\BoolValue $copy_only + * Deprecated: copy_only is deprecated. Use differential_base instead + * @type \Google\Protobuf\BoolValue $differential_base + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStriped() + { + return $this->striped; + } + + public function hasStriped() + { + return isset($this->striped); + } + + public function clearStriped() + { + unset($this->striped); + } + + /** + * Returns the unboxed value from getStriped() + + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @return bool|null + */ + public function getStripedUnwrapped() + { + return $this->readWrapperValue("striped"); + } + + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStriped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->striped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @param bool|null $var + * @return $this + */ + public function setStripedUnwrapped($var) + { + $this->writeWrapperValue("striped", $var); + return $this;} + + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getStripeCount() + { + return $this->stripe_count; + } + + public function hasStripeCount() + { + return isset($this->stripe_count); + } + + public function clearStripeCount() + { + unset($this->stripe_count); + } + + /** + * Returns the unboxed value from getStripeCount() + + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @return int|null + */ + public function getStripeCountUnwrapped() + { + return $this->readWrapperValue("stripe_count"); + } + + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setStripeCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->stripe_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @param int|null $var + * @return $this + */ + public function setStripeCountUnwrapped($var) + { + $this->writeWrapperValue("stripe_count", $var); + return $this;} + + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; + * @return int + */ + public function getBakType() + { + return $this->bak_type; + } + + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 4; + * @param int $var + * @return $this + */ + public function setBakType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BakType::class); + $this->bak_type = $var; + + return $this; + } + + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return $this->copy_only; + } + + public function hasCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return isset($this->copy_only); + } + + public function clearCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + unset($this->copy_only); + } + + /** + * Returns the unboxed value from getCopyOnly() + + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @return bool|null + */ + public function getCopyOnlyUnwrapped() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("copy_only"); + } + + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setCopyOnly($var) + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->copy_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setCopyOnlyUnwrapped($var) + { + $this->writeWrapperValue("copy_only", $var); + return $this;} + + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDifferentialBase() + { + return $this->differential_base; + } + + public function hasDifferentialBase() + { + return isset($this->differential_base); + } + + public function clearDifferentialBase() + { + unset($this->differential_base); + } + + /** + * Returns the unboxed value from getDifferentialBase() + + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @return bool|null + */ + public function getDifferentialBaseUnwrapped() + { + return $this->readWrapperValue("differential_base"); + } + + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDifferentialBase($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->differential_base = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @param bool|null $var + * @return $this + */ + public function setDifferentialBaseUnwrapped($var) + { + $this->writeWrapperValue("differential_base", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlBakExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlBakExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php new file mode 100644 index 000000000000..c73966c0af69 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlCsvExportOptions.php @@ -0,0 +1,216 @@ +google.cloud.sql.v1.ExportContext.SqlCsvExportOptions + */ +class SqlCsvExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + */ + protected $select_query = ''; + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + */ + protected $escape_character = ''; + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + */ + protected $quote_character = ''; + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + */ + protected $fields_terminated_by = ''; + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + */ + protected $lines_terminated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $select_query + * The select query used to extract the data. + * @type string $escape_character + * Specifies the character that should appear before a data character that + * needs to be escaped. + * @type string $quote_character + * Specifies the quoting character to be used when a data value is quoted. + * @type string $fields_terminated_by + * Specifies the character that separates columns within each row (line) of + * the file. + * @type string $lines_terminated_by + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + * @return string + */ + public function getSelectQuery() + { + return $this->select_query; + } + + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + * @param string $var + * @return $this + */ + public function setSelectQuery($var) + { + GPBUtil::checkString($var, True); + $this->select_query = $var; + + return $this; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + * @return string + */ + public function getEscapeCharacter() + { + return $this->escape_character; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + * @param string $var + * @return $this + */ + public function setEscapeCharacter($var) + { + GPBUtil::checkString($var, True); + $this->escape_character = $var; + + return $this; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + * @return string + */ + public function getQuoteCharacter() + { + return $this->quote_character; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + * @param string $var + * @return $this + */ + public function setQuoteCharacter($var) + { + GPBUtil::checkString($var, True); + $this->quote_character = $var; + + return $this; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + * @return string + */ + public function getFieldsTerminatedBy() + { + return $this->fields_terminated_by; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + * @param string $var + * @return $this + */ + public function setFieldsTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->fields_terminated_by = $var; + + return $this; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + * @return string + */ + public function getLinesTerminatedBy() + { + return $this->lines_terminated_by; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + * @param string $var + * @return $this + */ + public function setLinesTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->lines_terminated_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlCsvExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlCsvExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php new file mode 100644 index 000000000000..19ce46cfeb3e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions.php @@ -0,0 +1,326 @@ +google.cloud.sql.v1.ExportContext.SqlExportOptions + */ +class SqlExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + */ + private $tables; + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + */ + protected $schema_only = null; + /** + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + */ + protected $mysql_export_options = null; + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threads = null; + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallel = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $tables + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * @type \Google\Protobuf\BoolValue $schema_only + * Export only schemas. + * @type \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions $mysql_export_options + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel export. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the export should be parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTables() + { + return $this->tables; + } + + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tables = $arr; + + return $this; + } + + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSchemaOnly() + { + return $this->schema_only; + } + + public function hasSchemaOnly() + { + return isset($this->schema_only); + } + + public function clearSchemaOnly() + { + unset($this->schema_only); + } + + /** + * Returns the unboxed value from getSchemaOnly() + + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @return bool|null + */ + public function getSchemaOnlyUnwrapped() + { + return $this->readWrapperValue("schema_only"); + } + + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSchemaOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->schema_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @param bool|null $var + * @return $this + */ + public function setSchemaOnlyUnwrapped($var) + { + $this->writeWrapperValue("schema_only", $var); + return $this;} + + /** + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + * @return \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions|null + */ + public function getMysqlExportOptions() + { + return $this->mysql_export_options; + } + + public function hasMysqlExportOptions() + { + return isset($this->mysql_export_options); + } + + public function clearMysqlExportOptions() + { + unset($this->mysql_export_options); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + * @param \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions $var + * @return $this + */ + public function setMysqlExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext\SqlExportOptions\MysqlExportOptions::class); + $this->mysql_export_options = $var; + + return $this; + } + + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsUnwrapped() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsUnwrapped($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelUnwrapped() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelUnwrapped($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php new file mode 100644 index 000000000000..113b82d013e4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExportContext/SqlExportOptions/MysqlExportOptions.php @@ -0,0 +1,137 @@ +google.cloud.sql.v1.ExportContext.SqlExportOptions.MysqlExportOptions + */ +class MysqlExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + */ + protected $master_data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $master_data + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getMasterData() + { + return $this->master_data; + } + + public function hasMasterData() + { + return isset($this->master_data); + } + + public function clearMasterData() + { + unset($this->master_data); + } + + /** + * Returns the unboxed value from getMasterData() + + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @return int|null + */ + public function getMasterDataUnwrapped() + { + return $this->readWrapperValue("master_data"); + } + + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setMasterData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->master_data = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @param int|null $var + * @return $this + */ + public function setMasterDataUnwrapped($var) + { + $this->writeWrapperValue("master_data", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MysqlExportOptions::class, \Google\Cloud\Sql\V1\ExportContext_SqlExportOptions_MysqlExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php new file mode 100644 index 000000000000..c3d02dee27f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ExternalSyncParallelLevel.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1.ExternalSyncParallelLevel + */ +class ExternalSyncParallelLevel +{ + /** + * Unknown sync parallel level. Will be defaulted to OPTIMAL. + * + * Generated from protobuf enum EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; + */ + const EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; + /** + * Minimal parallel level. + * + * Generated from protobuf enum MIN = 1; + */ + const MIN = 1; + /** + * Optimal parallel level. + * + * Generated from protobuf enum OPTIMAL = 2; + */ + const OPTIMAL = 2; + /** + * Maximum parallel level. + * + * Generated from protobuf enum MAX = 3; + */ + const MAX = 3; + + private static $valueToName = [ + self::EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED => 'EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED', + self::MIN => 'MIN', + self::OPTIMAL => 'OPTIMAL', + self::MAX => 'MAX', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php new file mode 100644 index 000000000000..ca709f956f5d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FailoverContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1.FailoverContext + */ +class FailoverContext extends \Google\Protobuf\Internal\Message +{ + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + */ + protected $settings_version = 0; + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $settings_version + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * @type string $kind + * This is always `sql#failoverContext`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + * @return int|string + */ + public function getSettingsVersion() + { + return $this->settings_version; + } + + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + * @param int|string $var + * @return $this + */ + public function setSettingsVersion($var) + { + GPBUtil::checkInt64($var); + $this->settings_version = $var; + + return $this; + } + + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php new file mode 100644 index 000000000000..3a0051417697 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Flag.php @@ -0,0 +1,579 @@ +google.cloud.sql.v1.Flag + */ +class Flag extends \Google\Protobuf\Internal\Message +{ + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; + */ + protected $type = 0; + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; + */ + private $applies_to; + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + */ + private $allowed_string_values; + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + */ + protected $min_value = null; + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + */ + protected $max_value = null; + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + */ + protected $requires_restart = null; + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + */ + protected $kind = ''; + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + */ + protected $in_beta = null; + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + */ + private $allowed_int_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * @type int $type + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * @type array|\Google\Protobuf\Internal\RepeatedField $applies_to + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_string_values + * For `STRING` flags, a list of strings that the value can be set to. + * @type \Google\Protobuf\Int64Value $min_value + * For `INTEGER` flags, the minimum allowed value. + * @type \Google\Protobuf\Int64Value $max_value + * For `INTEGER` flags, the maximum allowed value. + * @type \Google\Protobuf\BoolValue $requires_restart + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * @type string $kind + * This is always `sql#flag`. + * @type \Google\Protobuf\BoolValue $in_beta + * Whether or not the flag is considered in beta. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $allowed_int_values + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); + parent::__construct($data); + } + + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags that do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFlagType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFlagType::class); + $this->type = $var; + + return $this; + } + + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliesTo() + { + return $this->applies_to; + } + + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlDatabaseVersion applies_to = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliesTo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1\SqlDatabaseVersion::class); + $this->applies_to = $arr; + + return $this; + } + + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedStringValues() + { + return $this->allowed_string_values; + } + + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedStringValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_string_values = $arr; + + return $this; + } + + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMinValue() + { + return $this->min_value; + } + + public function hasMinValue() + { + return isset($this->min_value); + } + + public function clearMinValue() + { + unset($this->min_value); + } + + /** + * Returns the unboxed value from getMinValue() + + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @return int|string|null + */ + public function getMinValueUnwrapped() + { + return $this->readWrapperValue("min_value"); + } + + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->min_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @param int|string|null $var + * @return $this + */ + public function setMinValueUnwrapped($var) + { + $this->writeWrapperValue("min_value", $var); + return $this;} + + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMaxValue() + { + return $this->max_value; + } + + public function hasMaxValue() + { + return isset($this->max_value); + } + + public function clearMaxValue() + { + unset($this->max_value); + } + + /** + * Returns the unboxed value from getMaxValue() + + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @return int|string|null + */ + public function getMaxValueUnwrapped() + { + return $this->readWrapperValue("max_value"); + } + + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @param int|string|null $var + * @return $this + */ + public function setMaxValueUnwrapped($var) + { + $this->writeWrapperValue("max_value", $var); + return $this;} + + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRequiresRestart() + { + return $this->requires_restart; + } + + public function hasRequiresRestart() + { + return isset($this->requires_restart); + } + + public function clearRequiresRestart() + { + unset($this->requires_restart); + } + + /** + * Returns the unboxed value from getRequiresRestart() + + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @return bool|null + */ + public function getRequiresRestartUnwrapped() + { + return $this->readWrapperValue("requires_restart"); + } + + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRequiresRestart($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->requires_restart = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @param bool|null $var + * @return $this + */ + public function setRequiresRestartUnwrapped($var) + { + $this->writeWrapperValue("requires_restart", $var); + return $this;} + + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @return \Google\Protobuf\BoolValue|null + */ + public function getInBeta() + { + return $this->in_beta; + } + + public function hasInBeta() + { + return isset($this->in_beta); + } + + public function clearInBeta() + { + unset($this->in_beta); + } + + /** + * Returns the unboxed value from getInBeta() + + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @return bool|null + */ + public function getInBetaUnwrapped() + { + return $this->readWrapperValue("in_beta"); + } + + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setInBeta($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->in_beta = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @param bool|null $var + * @return $this + */ + public function setInBetaUnwrapped($var) + { + $this->writeWrapperValue("in_beta", $var); + return $this;} + + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedIntValues() + { + return $this->allowed_int_values; + } + + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedIntValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->allowed_int_values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php new file mode 100644 index 000000000000..a6691eeb2c74 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/FlagsListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.FlagsListResponse + */ +class FlagsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#flagsList`. + * @type array<\Google\Cloud\Sql\V1\Flag>|\Google\Protobuf\Internal\RepeatedField $items + * List of flags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Flag items = 2; + * @param array<\Google\Cloud\Sql\V1\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Flag::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php new file mode 100644 index 000000000000..e6ed6d931766 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GeminiInstanceConfig.php @@ -0,0 +1,297 @@ +google.cloud.sql.v1.GeminiInstanceConfig + */ +class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entitled = null; + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_vacuum_mgmt_enabled = null; + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oom_session_cancel_enabled = null; + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active_query_enabled = null; + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_advisor_enabled = null; + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $flag_recommender_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $entitled + * Output only. Whether gemini is enabled. + * @type bool $google_vacuum_mgmt_enabled + * Output only. Whether vacuum management is enabled. + * @type bool $oom_session_cancel_enabled + * Output only. Whether oom session cancel is enabled. + * @type bool $active_query_enabled + * Output only. Whether active query is enabled. + * @type bool $index_advisor_enabled + * Output only. Whether index advisor is enabled. + * @type bool $flag_recommender_enabled + * Output only. Whether flag recommender is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getEntitled() + { + return isset($this->entitled) ? $this->entitled : false; + } + + public function hasEntitled() + { + return isset($this->entitled); + } + + public function clearEntitled() + { + unset($this->entitled); + } + + /** + * Output only. Whether gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEntitled($var) + { + GPBUtil::checkBool($var); + $this->entitled = $var; + + return $this; + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false; + } + + public function hasGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled); + } + + public function clearGoogleVacuumMgmtEnabled() + { + unset($this->google_vacuum_mgmt_enabled); + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleVacuumMgmtEnabled($var) + { + GPBUtil::checkBool($var); + $this->google_vacuum_mgmt_enabled = $var; + + return $this; + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false; + } + + public function hasOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled); + } + + public function clearOomSessionCancelEnabled() + { + unset($this->oom_session_cancel_enabled); + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOomSessionCancelEnabled($var) + { + GPBUtil::checkBool($var); + $this->oom_session_cancel_enabled = $var; + + return $this; + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActiveQueryEnabled() + { + return isset($this->active_query_enabled) ? $this->active_query_enabled : false; + } + + public function hasActiveQueryEnabled() + { + return isset($this->active_query_enabled); + } + + public function clearActiveQueryEnabled() + { + unset($this->active_query_enabled); + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActiveQueryEnabled($var) + { + GPBUtil::checkBool($var); + $this->active_query_enabled = $var; + + return $this; + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false; + } + + public function hasIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled); + } + + public function clearIndexAdvisorEnabled() + { + unset($this->index_advisor_enabled); + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIndexAdvisorEnabled($var) + { + GPBUtil::checkBool($var); + $this->index_advisor_enabled = $var; + + return $this; + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false; + } + + public function hasFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled); + } + + public function clearFlagRecommenderEnabled() + { + unset($this->flag_recommender_enabled); + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFlagRecommenderEnabled($var) + { + GPBUtil::checkBool($var); + $this->flag_recommender_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php new file mode 100644 index 000000000000..8a1c5622df77 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertRequest.php @@ -0,0 +1,261 @@ +google.cloud.sql.v1.GenerateEphemeralCertRequest + */ +class GenerateEphemeralCertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + */ + protected $public_key = ''; + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $access_token = ''; + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_time = null; + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $valid_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $public_key + * PEM encoded public key to include in the signed certificate. + * @type string $access_token + * Optional. Access token to include in the signed certificate. + * @type \Google\Protobuf\Timestamp $read_time + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * @type \Google\Protobuf\Duration $valid_duration + * Optional. If set, it will contain the cert valid duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getValidDuration() + { + return $this->valid_duration; + } + + public function hasValidDuration() + { + return isset($this->valid_duration); + } + + public function clearValidDuration() + { + unset($this->valid_duration); + } + + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setValidDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->valid_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php new file mode 100644 index 000000000000..8830de381056 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GenerateEphemeralCertResponse.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.GenerateEphemeralCertResponse + */ +class GenerateEphemeralCertResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; + */ + protected $ephemeral_cert = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\SslCert $ephemeral_cert + * Generated cert + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getEphemeralCert() + { + return $this->ephemeral_cert; + } + + public function hasEphemeralCert() + { + return isset($this->ephemeral_cert); + } + + public function clearEphemeralCert() + { + unset($this->ephemeral_cert); + } + + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert ephemeral_cert = 1; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setEphemeralCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->ephemeral_cert = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php new file mode 100644 index 000000000000..9e2eede2ac38 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/GetConnectSettingsRequest.php @@ -0,0 +1,149 @@ +google.cloud.sql.v1.GetConnectSettingsRequest + */ +class GetConnectSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Protobuf\Timestamp $read_time + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php new file mode 100644 index 000000000000..06b90533ca26 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext.php @@ -0,0 +1,363 @@ +google.cloud.sql.v1.ImportContext + */ +class ImportContext extends \Google\Protobuf\Internal\Message +{ + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + */ + protected $database = ''; + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; + */ + protected $file_type = 0; + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; + */ + protected $csv_import_options = null; + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + */ + protected $import_user = ''; + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; + */ + protected $bak_import_options = null; + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sql_import_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $database + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * @type string $kind + * This is always `sql#importContext`. + * @type int $file_type + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * @type \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions $csv_import_options + * Options for importing data as CSV. + * @type string $import_user + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $bak_import_options + * Import parameters specific to SQL Server .BAK files + * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $sql_import_options + * Optional. Options for importing data from SQL statements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; + * @return int + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * The file type for the specified uri.\`SQL`: The file + * contains SQL statements. \`CSV`: The file contains CSV data. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlFileType file_type = 4; + * @param int $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlFileType::class); + $this->file_type = $var; + + return $this; + } + + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions|null + */ + public function getCsvImportOptions() + { + return $this->csv_import_options; + } + + public function hasCsvImportOptions() + { + return isset($this->csv_import_options); + } + + public function clearCsvImportOptions() + { + unset($this->csv_import_options); + } + + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlCsvImportOptions csv_import_options = 5; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions $var + * @return $this + */ + public function setCsvImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlCsvImportOptions::class); + $this->csv_import_options = $var; + + return $this; + } + + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + * @return string + */ + public function getImportUser() + { + return $this->import_user; + } + + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + * @param string $var + * @return $this + */ + public function setImportUser($var) + { + GPBUtil::checkString($var, True); + $this->import_user = $var; + + return $this; + } + + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions|null + */ + public function getBakImportOptions() + { + return $this->bak_import_options; + } + + public function hasBakImportOptions() + { + return isset($this->bak_import_options); + } + + public function clearBakImportOptions() + { + unset($this->bak_import_options); + } + + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $var + * @return $this + */ + public function setBakImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions::class); + $this->bak_import_options = $var; + + return $this; + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions|null + */ + public function getSqlImportOptions() + { + return $this->sql_import_options; + } + + public function hasSqlImportOptions() + { + return isset($this->sql_import_options); + } + + public function clearSqlImportOptions() + { + unset($this->sql_import_options); + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $var + * @return $this + */ + public function setSqlImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions::class); + $this->sql_import_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php new file mode 100644 index 000000000000..5d36cba31680 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions.php @@ -0,0 +1,452 @@ +google.cloud.sql.v1.ImportContext.SqlBakImportOptions + */ +class SqlBakImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + */ + protected $encryption_options = null; + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + */ + protected $striped = null; + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + */ + protected $no_recovery = null; + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + */ + protected $recovery_only = null; + /** + * Type of the bak content, FULL or DIFF + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; + */ + protected $bak_type = 0; + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stop_at = null; + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stop_at_mark = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions $encryption_options + * @type \Google\Protobuf\BoolValue $striped + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * @type \Google\Protobuf\BoolValue $no_recovery + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * @type \Google\Protobuf\BoolValue $recovery_only + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * @type int $bak_type + * Type of the bak content, FULL or DIFF + * @type \Google\Protobuf\Timestamp $stop_at + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * @type string $stop_at_mark + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions|null + */ + public function getEncryptionOptions() + { + return $this->encryption_options; + } + + public function hasEncryptionOptions() + { + return isset($this->encryption_options); + } + + public function clearEncryptionOptions() + { + unset($this->encryption_options); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions $var + * @return $this + */ + public function setEncryptionOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions\EncryptionOptions::class); + $this->encryption_options = $var; + + return $this; + } + + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStriped() + { + return $this->striped; + } + + public function hasStriped() + { + return isset($this->striped); + } + + public function clearStriped() + { + unset($this->striped); + } + + /** + * Returns the unboxed value from getStriped() + + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @return bool|null + */ + public function getStripedUnwrapped() + { + return $this->readWrapperValue("striped"); + } + + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStriped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->striped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @param bool|null $var + * @return $this + */ + public function setStripedUnwrapped($var) + { + $this->writeWrapperValue("striped", $var); + return $this;} + + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getNoRecovery() + { + return $this->no_recovery; + } + + public function hasNoRecovery() + { + return isset($this->no_recovery); + } + + public function clearNoRecovery() + { + unset($this->no_recovery); + } + + /** + * Returns the unboxed value from getNoRecovery() + + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @return bool|null + */ + public function getNoRecoveryUnwrapped() + { + return $this->readWrapperValue("no_recovery"); + } + + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setNoRecovery($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->no_recovery = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @param bool|null $var + * @return $this + */ + public function setNoRecoveryUnwrapped($var) + { + $this->writeWrapperValue("no_recovery", $var); + return $this;} + + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRecoveryOnly() + { + return $this->recovery_only; + } + + public function hasRecoveryOnly() + { + return isset($this->recovery_only); + } + + public function clearRecoveryOnly() + { + unset($this->recovery_only); + } + + /** + * Returns the unboxed value from getRecoveryOnly() + + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @return bool|null + */ + public function getRecoveryOnlyUnwrapped() + { + return $this->readWrapperValue("recovery_only"); + } + + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRecoveryOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->recovery_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @param bool|null $var + * @return $this + */ + public function setRecoveryOnlyUnwrapped($var) + { + $this->writeWrapperValue("recovery_only", $var); + return $this;} + + /** + * Type of the bak content, FULL or DIFF + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; + * @return int + */ + public function getBakType() + { + return $this->bak_type; + } + + /** + * Type of the bak content, FULL or DIFF + * + * Generated from protobuf field .google.cloud.sql.v1.BakType bak_type = 6; + * @param int $var + * @return $this + */ + public function setBakType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BakType::class); + $this->bak_type = $var; + + return $this; + } + + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStopAt() + { + return $this->stop_at; + } + + public function hasStopAt() + { + return isset($this->stop_at); + } + + public function clearStopAt() + { + unset($this->stop_at); + } + + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStopAt($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->stop_at = $var; + + return $this; + } + + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getStopAtMark() + { + return $this->stop_at_mark; + } + + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setStopAtMark($var) + { + GPBUtil::checkString($var, True); + $this->stop_at_mark = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlBakImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlBakImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php new file mode 100644 index 000000000000..2e46dffcbc90 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlBakImportOptions/EncryptionOptions.php @@ -0,0 +1,152 @@ +google.cloud.sql.v1.ImportContext.SqlBakImportOptions.EncryptionOptions + */ +class EncryptionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + */ + protected $cert_path = ''; + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + */ + protected $pvk_path = ''; + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + */ + protected $pvk_password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cert_path + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $pvk_path + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $pvk_password + * Password that encrypts the private key + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + * @return string + */ + public function getCertPath() + { + return $this->cert_path; + } + + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + * @param string $var + * @return $this + */ + public function setCertPath($var) + { + GPBUtil::checkString($var, True); + $this->cert_path = $var; + + return $this; + } + + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + * @return string + */ + public function getPvkPath() + { + return $this->pvk_path; + } + + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + * @param string $var + * @return $this + */ + public function setPvkPath($var) + { + GPBUtil::checkString($var, True); + $this->pvk_path = $var; + + return $this; + } + + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + * @return string + */ + public function getPvkPassword() + { + return $this->pvk_password; + } + + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + * @param string $var + * @return $this + */ + public function setPvkPassword($var) + { + GPBUtil::checkString($var, True); + $this->pvk_password = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncryptionOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlBakImportOptions_EncryptionOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php new file mode 100644 index 000000000000..e320a13a1262 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlCsvImportOptions.php @@ -0,0 +1,254 @@ +google.cloud.sql.v1.ImportContext.SqlCsvImportOptions + */ +class SqlCsvImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + */ + private $columns; + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + */ + protected $escape_character = ''; + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + */ + protected $quote_character = ''; + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + */ + protected $fields_terminated_by = ''; + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + */ + protected $lines_terminated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * The table to which CSV data is imported. + * @type array|\Google\Protobuf\Internal\RepeatedField $columns + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * @type string $escape_character + * Specifies the character that should appear before a data character that + * needs to be escaped. + * @type string $quote_character + * Specifies the quoting character to be used when a data value is quoted. + * @type string $fields_terminated_by + * Specifies the character that separates columns within each row (line) of + * the file. + * @type string $lines_terminated_by + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->columns = $arr; + + return $this; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + * @return string + */ + public function getEscapeCharacter() + { + return $this->escape_character; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + * @param string $var + * @return $this + */ + public function setEscapeCharacter($var) + { + GPBUtil::checkString($var, True); + $this->escape_character = $var; + + return $this; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + * @return string + */ + public function getQuoteCharacter() + { + return $this->quote_character; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + * @param string $var + * @return $this + */ + public function setQuoteCharacter($var) + { + GPBUtil::checkString($var, True); + $this->quote_character = $var; + + return $this; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + * @return string + */ + public function getFieldsTerminatedBy() + { + return $this->fields_terminated_by; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + * @param string $var + * @return $this + */ + public function setFieldsTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->fields_terminated_by = $var; + + return $this; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + * @return string + */ + public function getLinesTerminatedBy() + { + return $this->lines_terminated_by; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + * @param string $var + * @return $this + */ + public function setLinesTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->lines_terminated_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlCsvImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlCsvImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php new file mode 100644 index 000000000000..f692dd757159 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ImportContext/SqlImportOptions.php @@ -0,0 +1,176 @@ +google.cloud.sql.v1.ImportContext.SqlImportOptions + */ +class SqlImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threads = null; + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallel = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel import. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the import should be parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsUnwrapped() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsUnwrapped($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelUnwrapped() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelUnwrapped($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlImportOptions::class, \Google\Cloud\Sql\V1\ImportContext_SqlImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php new file mode 100644 index 000000000000..0614d521e328 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InsightsConfig.php @@ -0,0 +1,306 @@ +google.cloud.sql.v1.InsightsConfig + */ +class InsightsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + */ + protected $query_insights_enabled = false; + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + */ + protected $record_client_address = false; + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + */ + protected $record_application_tags = false; + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + */ + protected $query_string_length = null; + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + */ + protected $query_plans_per_minute = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $query_insights_enabled + * Whether Query Insights feature is enabled. + * @type bool $record_client_address + * Whether Query Insights will record client address when enabled. + * @type bool $record_application_tags + * Whether Query Insights will record application tags from query when + * enabled. + * @type \Google\Protobuf\Int32Value $query_string_length + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * @type \Google\Protobuf\Int32Value $query_plans_per_minute + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + * @return bool + */ + public function getQueryInsightsEnabled() + { + return $this->query_insights_enabled; + } + + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + * @param bool $var + * @return $this + */ + public function setQueryInsightsEnabled($var) + { + GPBUtil::checkBool($var); + $this->query_insights_enabled = $var; + + return $this; + } + + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + * @return bool + */ + public function getRecordClientAddress() + { + return $this->record_client_address; + } + + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + * @param bool $var + * @return $this + */ + public function setRecordClientAddress($var) + { + GPBUtil::checkBool($var); + $this->record_client_address = $var; + + return $this; + } + + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + * @return bool + */ + public function getRecordApplicationTags() + { + return $this->record_application_tags; + } + + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + * @param bool $var + * @return $this + */ + public function setRecordApplicationTags($var) + { + GPBUtil::checkBool($var); + $this->record_application_tags = $var; + + return $this; + } + + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @return \Google\Protobuf\Int32Value|null + */ + public function getQueryStringLength() + { + return $this->query_string_length; + } + + public function hasQueryStringLength() + { + return isset($this->query_string_length); + } + + public function clearQueryStringLength() + { + unset($this->query_string_length); + } + + /** + * Returns the unboxed value from getQueryStringLength() + + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @return int|null + */ + public function getQueryStringLengthUnwrapped() + { + return $this->readWrapperValue("query_string_length"); + } + + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQueryStringLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->query_string_length = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @param int|null $var + * @return $this + */ + public function setQueryStringLengthUnwrapped($var) + { + $this->writeWrapperValue("query_string_length", $var); + return $this;} + + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getQueryPlansPerMinute() + { + return $this->query_plans_per_minute; + } + + public function hasQueryPlansPerMinute() + { + return isset($this->query_plans_per_minute); + } + + public function clearQueryPlansPerMinute() + { + unset($this->query_plans_per_minute); + } + + /** + * Returns the unboxed value from getQueryPlansPerMinute() + + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @return int|null + */ + public function getQueryPlansPerMinuteUnwrapped() + { + return $this->readWrapperValue("query_plans_per_minute"); + } + + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQueryPlansPerMinute($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->query_plans_per_minute = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @param int|null $var + * @return $this + */ + public function setQueryPlansPerMinuteUnwrapped($var) + { + $this->writeWrapperValue("query_plans_per_minute", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php new file mode 100644 index 000000000000..408946eab2e9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstanceReference.php @@ -0,0 +1,143 @@ +google.cloud.sql.v1.InstanceReference + */ +class InstanceReference extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + */ + protected $region = ''; + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * @type string $region + * The region of the Cloud SQL instance being referenced. + * @type string $project + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..59a57b65e6a8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest + */ +class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + */ + protected $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * Contains details about the acquire SSRS lease operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php new file mode 100644 index 000000000000..966e8da45186 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesCloneRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesCloneRequest + */ +class InstancesCloneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; + */ + protected $clone_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\CloneContext $clone_context + * Contains details about the clone operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; + * @return \Google\Cloud\Sql\V1\CloneContext|null + */ + public function getCloneContext() + { + return $this->clone_context; + } + + public function hasCloneContext() + { + return isset($this->clone_context); + } + + public function clearCloneContext() + { + unset($this->clone_context); + } + + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1.CloneContext clone_context = 1; + * @param \Google\Cloud\Sql\V1\CloneContext $var + * @return $this + */ + public function setCloneContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\CloneContext::class); + $this->clone_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php new file mode 100644 index 000000000000..eb523b01e5f6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteMasterRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesDemoteMasterRequest + */ +class InstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; + */ + protected $demote_master_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\DemoteMasterContext $demote_master_context + * Contains details about the demoteMaster operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; + * @return \Google\Cloud\Sql\V1\DemoteMasterContext|null + */ + public function getDemoteMasterContext() + { + return $this->demote_master_context; + } + + public function hasDemoteMasterContext() + { + return isset($this->demote_master_context); + } + + public function clearDemoteMasterContext() + { + unset($this->demote_master_context); + } + + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteMasterContext demote_master_context = 1; + * @param \Google\Cloud\Sql\V1\DemoteMasterContext $var + * @return $this + */ + public function setDemoteMasterContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteMasterContext::class); + $this->demote_master_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php new file mode 100644 index 000000000000..d2c405572a4c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesDemoteRequest.php @@ -0,0 +1,78 @@ +google.cloud.sql.v1.InstancesDemoteRequest + */ +class InstancesDemoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Contains details about the demote operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $demote_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\DemoteContext $demote_context + * Required. Contains details about the demote operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Contains details about the demote operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\DemoteContext|null + */ + public function getDemoteContext() + { + return $this->demote_context; + } + + public function hasDemoteContext() + { + return isset($this->demote_context); + } + + public function clearDemoteContext() + { + unset($this->demote_context); + } + + /** + * Required. Contains details about the demote operation. + * + * Generated from protobuf field .google.cloud.sql.v1.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\DemoteContext $var + * @return $this + */ + public function setDemoteContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DemoteContext::class); + $this->demote_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php new file mode 100644 index 000000000000..c5b961981af4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesExportRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesExportRequest + */ +class InstancesExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; + */ + protected $export_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\ExportContext $export_context + * Contains details about the export operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; + * @return \Google\Cloud\Sql\V1\ExportContext|null + */ + public function getExportContext() + { + return $this->export_context; + } + + public function hasExportContext() + { + return isset($this->export_context); + } + + public function clearExportContext() + { + unset($this->export_context); + } + + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 1; + * @param \Google\Cloud\Sql\V1\ExportContext $var + * @return $this + */ + public function setExportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext::class); + $this->export_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php new file mode 100644 index 000000000000..3fbccb780c2b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesFailoverRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesFailoverRequest + */ +class InstancesFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; + */ + protected $failover_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\FailoverContext $failover_context + * Failover Context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; + * @return \Google\Cloud\Sql\V1\FailoverContext|null + */ + public function getFailoverContext() + { + return $this->failover_context; + } + + public function hasFailoverContext() + { + return isset($this->failover_context); + } + + public function clearFailoverContext() + { + unset($this->failover_context); + } + + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1.FailoverContext failover_context = 1; + * @param \Google\Cloud\Sql\V1\FailoverContext $var + * @return $this + */ + public function setFailoverContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\FailoverContext::class); + $this->failover_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php new file mode 100644 index 000000000000..68c3f5dc1b15 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesImportRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesImportRequest + */ +class InstancesImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; + */ + protected $import_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\ImportContext $import_context + * Contains details about the import operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; + * @return \Google\Cloud\Sql\V1\ImportContext|null + */ + public function getImportContext() + { + return $this->import_context; + } + + public function hasImportContext() + { + return isset($this->import_context); + } + + public function clearImportContext() + { + unset($this->import_context); + } + + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 1; + * @param \Google\Cloud\Sql\V1\ImportContext $var + * @return $this + */ + public function setImportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext::class); + $this->import_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php new file mode 100644 index 000000000000..8f182efcbb27 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListResponse.php @@ -0,0 +1,173 @@ +google.cloud.sql.v1.InstancesListResponse + */ +class InstancesListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; + */ + private $warnings; + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#instancesList`. + * @type array<\Google\Cloud\Sql\V1\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $warnings + * List of warnings that occurred while handling the request. + * @type array<\Google\Cloud\Sql\V1\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $items + * List of database instance resources. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.ApiWarning warnings = 2; + * @param array<\Google\Cloud\Sql\V1\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\ApiWarning::class); + $this->warnings = $arr; + + return $this; + } + + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseInstance items = 3; + * @param array<\Google\Cloud\Sql\V1\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php new file mode 100644 index 000000000000..488af9f2b7e7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesListServerCasResponse.php @@ -0,0 +1,128 @@ +google.cloud.sql.v1.InstancesListServerCasResponse + */ +class InstancesListServerCasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; + */ + private $certs; + /** + * Generated from protobuf field string active_version = 2; + */ + protected $active_version = ''; + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $certs + * List of server CA certificates for the instance. + * @type string $active_version + * @type string $kind + * This is always `sql#instancesListServerCas`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCerts() + { + return $this->certs; + } + + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert certs = 1; + * @param array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SslCert::class); + $this->certs = $arr; + + return $this; + } + + /** + * Generated from protobuf field string active_version = 2; + * @return string + */ + public function getActiveVersion() + { + return $this->active_version; + } + + /** + * Generated from protobuf field string active_version = 2; + * @param string $var + * @return $this + */ + public function setActiveVersion($var) + { + GPBUtil::checkString($var, True); + $this->active_version = $var; + + return $this; + } + + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php new file mode 100644 index 000000000000..ffd45275fa43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesReencryptRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesReencryptRequest + */ +class InstancesReencryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; + */ + protected $backup_reencryption_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\BackupReencryptionConfig $backup_reencryption_config + * Configuration specific to backup re-encryption + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; + * @return \Google\Cloud\Sql\V1\BackupReencryptionConfig|null + */ + public function getBackupReencryptionConfig() + { + return $this->backup_reencryption_config; + } + + public function hasBackupReencryptionConfig() + { + return isset($this->backup_reencryption_config); + } + + public function clearBackupReencryptionConfig() + { + unset($this->backup_reencryption_config); + } + + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupReencryptionConfig backup_reencryption_config = 1; + * @param \Google\Cloud\Sql\V1\BackupReencryptionConfig $var + * @return $this + */ + public function setBackupReencryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupReencryptionConfig::class); + $this->backup_reencryption_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php new file mode 100644 index 000000000000..46c274d13f1b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRestoreBackupRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesRestoreBackupRequest + */ +class InstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; + */ + protected $restore_backup_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\RestoreBackupContext $restore_backup_context + * Parameters required to perform the restore backup operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; + * @return \Google\Cloud\Sql\V1\RestoreBackupContext|null + */ + public function getRestoreBackupContext() + { + return $this->restore_backup_context; + } + + public function hasRestoreBackupContext() + { + return isset($this->restore_backup_context); + } + + public function clearRestoreBackupContext() + { + unset($this->restore_backup_context); + } + + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RestoreBackupContext restore_backup_context = 1; + * @param \Google\Cloud\Sql\V1\RestoreBackupContext $var + * @return $this + */ + public function setRestoreBackupContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\RestoreBackupContext::class); + $this->restore_backup_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php new file mode 100644 index 000000000000..74b58e53c479 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesRotateServerCaRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesRotateServerCaRequest + */ +class InstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; + */ + protected $rotate_server_ca_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\RotateServerCaContext $rotate_server_ca_context + * Contains details about the rotate server CA operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; + * @return \Google\Cloud\Sql\V1\RotateServerCaContext|null + */ + public function getRotateServerCaContext() + { + return $this->rotate_server_ca_context; + } + + public function hasRotateServerCaContext() + { + return isset($this->rotate_server_ca_context); + } + + public function clearRotateServerCaContext() + { + unset($this->rotate_server_ca_context); + } + + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1.RotateServerCaContext rotate_server_ca_context = 1; + * @param \Google\Cloud\Sql\V1\RotateServerCaContext $var + * @return $this + */ + public function setRotateServerCaContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\RotateServerCaContext::class); + $this->rotate_server_ca_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php new file mode 100644 index 000000000000..2a0b469e871c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/InstancesTruncateLogRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesTruncateLogRequest + */ +class InstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; + */ + protected $truncate_log_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\TruncateLogContext $truncate_log_context + * Contains details about the truncate log operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; + * @return \Google\Cloud\Sql\V1\TruncateLogContext|null + */ + public function getTruncateLogContext() + { + return $this->truncate_log_context; + } + + public function hasTruncateLogContext() + { + return isset($this->truncate_log_context); + } + + public function clearTruncateLogContext() + { + unset($this->truncate_log_context); + } + + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1.TruncateLogContext truncate_log_context = 1; + * @param \Google\Cloud\Sql\V1\TruncateLogContext $var + * @return $this + */ + public function setTruncateLogContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\TruncateLogContext::class); + $this->truncate_log_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php new file mode 100644 index 000000000000..4f1b72c50b2d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration.php @@ -0,0 +1,574 @@ +google.cloud.sql.v1.IpConfiguration + */ +class IpConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + */ + protected $ipv4_enabled = null; + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + */ + protected $private_network = ''; + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + */ + protected $require_ssl = null; + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; + */ + private $authorized_networks; + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + */ + protected $allocated_ip_range = ''; + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + */ + protected $enable_private_path_for_google_cloud_services = null; + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; + */ + protected $ssl_mode = 0; + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; + */ + protected $psc_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $ipv4_enabled + * Whether the instance is assigned a public IP address or not. + * @type string $private_network + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * @type \Google\Protobuf\BoolValue $require_ssl + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * @type array<\Google\Cloud\Sql\V1\AclEntry>|\Google\Protobuf\Internal\RepeatedField $authorized_networks + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * @type string $allocated_ip_range + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * @type \Google\Protobuf\BoolValue $enable_private_path_for_google_cloud_services + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * @type int $ssl_mode + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * @type \Google\Cloud\Sql\V1\PscConfig $psc_config + * PSC settings for this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIpv4Enabled() + { + return $this->ipv4_enabled; + } + + public function hasIpv4Enabled() + { + return isset($this->ipv4_enabled); + } + + public function clearIpv4Enabled() + { + unset($this->ipv4_enabled); + } + + /** + * Returns the unboxed value from getIpv4Enabled() + + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @return bool|null + */ + public function getIpv4EnabledUnwrapped() + { + return $this->readWrapperValue("ipv4_enabled"); + } + + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIpv4Enabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->ipv4_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @param bool|null $var + * @return $this + */ + public function setIpv4EnabledUnwrapped($var) + { + $this->writeWrapperValue("ipv4_enabled", $var); + return $this;} + + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + * @return string + */ + public function getPrivateNetwork() + { + return $this->private_network; + } + + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + * @param string $var + * @return $this + */ + public function setPrivateNetwork($var) + { + GPBUtil::checkString($var, True); + $this->private_network = $var; + + return $this; + } + + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRequireSsl() + { + return $this->require_ssl; + } + + public function hasRequireSsl() + { + return isset($this->require_ssl); + } + + public function clearRequireSsl() + { + unset($this->require_ssl); + } + + /** + * Returns the unboxed value from getRequireSsl() + + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @return bool|null + */ + public function getRequireSslUnwrapped() + { + return $this->readWrapperValue("require_ssl"); + } + + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRequireSsl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->require_ssl = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @param bool|null $var + * @return $this + */ + public function setRequireSslUnwrapped($var) + { + $this->writeWrapperValue("require_ssl", $var); + return $this;} + + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizedNetworks() + { + return $this->authorized_networks; + } + + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1.AclEntry authorized_networks = 4; + * @param array<\Google\Cloud\Sql\V1\AclEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizedNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\AclEntry::class); + $this->authorized_networks = $arr; + + return $this; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + * @return string + */ + public function getAllocatedIpRange() + { + return $this->allocated_ip_range; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + * @param string $var + * @return $this + */ + public function setAllocatedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->allocated_ip_range = $var; + + return $this; + } + + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnablePrivatePathForGoogleCloudServices() + { + return $this->enable_private_path_for_google_cloud_services; + } + + public function hasEnablePrivatePathForGoogleCloudServices() + { + return isset($this->enable_private_path_for_google_cloud_services); + } + + public function clearEnablePrivatePathForGoogleCloudServices() + { + unset($this->enable_private_path_for_google_cloud_services); + } + + /** + * Returns the unboxed value from getEnablePrivatePathForGoogleCloudServices() + + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @return bool|null + */ + public function getEnablePrivatePathForGoogleCloudServicesUnwrapped() + { + return $this->readWrapperValue("enable_private_path_for_google_cloud_services"); + } + + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnablePrivatePathForGoogleCloudServices($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_private_path_for_google_cloud_services = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @param bool|null $var + * @return $this + */ + public function setEnablePrivatePathForGoogleCloudServicesUnwrapped($var) + { + $this->writeWrapperValue("enable_private_path_for_google_cloud_services", $var); + return $this;} + + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; + * @return int + */ + public function getSslMode() + { + return $this->ssl_mode; + } + + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; + * @param int $var + * @return $this + */ + public function setSslMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\IpConfiguration\SslMode::class); + $this->ssl_mode = $var; + + return $this; + } + + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; + * @return \Google\Cloud\Sql\V1\PscConfig|null + */ + public function getPscConfig() + { + return $this->psc_config; + } + + public function hasPscConfig() + { + return isset($this->psc_config); + } + + public function clearPscConfig() + { + unset($this->psc_config); + } + + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1.PscConfig psc_config = 9; + * @param \Google\Cloud\Sql\V1\PscConfig $var + * @return $this + */ + public function setPscConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PscConfig::class); + $this->psc_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php new file mode 100644 index 000000000000..410a433031b9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpConfiguration/SslMode.php @@ -0,0 +1,86 @@ +google.cloud.sql.v1.IpConfiguration.SslMode + */ +class SslMode +{ + /** + * The SSL mode is unknown. + * + * Generated from protobuf enum SSL_MODE_UNSPECIFIED = 0; + */ + const SSL_MODE_UNSPECIFIED = 0; + /** + * Allow non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, + * the client certificate won't be verified. + * When this value is used, the legacy `require_ssl` flag must be false or + * cleared to avoid the conflict between values of two flags. + * + * Generated from protobuf enum ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; + */ + const ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; + /** + * Only allow connections encrypted with SSL/TLS. + * When this value is used, the legacy `require_ssl` flag must be false or + * cleared to avoid the conflict between values of two flags. + * + * Generated from protobuf enum ENCRYPTED_ONLY = 2; + */ + const ENCRYPTED_ONLY = 2; + /** + * Only allow connections encrypted with SSL/TLS and with valid + * client certificates. + * When this value is used, the legacy `require_ssl` flag must be true or + * cleared to avoid the conflict between values of two flags. + * PostgreSQL clients or users that connect using IAM database + * authentication must use either the + * [Cloud SQL Auth + * Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or + * [Cloud SQL + * Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) + * to enforce client identity verification. + * + * Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; + */ + const TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; + + private static $valueToName = [ + self::SSL_MODE_UNSPECIFIED => 'SSL_MODE_UNSPECIFIED', + self::ALLOW_UNENCRYPTED_AND_ENCRYPTED => 'ALLOW_UNENCRYPTED_AND_ENCRYPTED', + self::ENCRYPTED_ONLY => 'ENCRYPTED_ONLY', + self::TRUSTED_CLIENT_CERTIFICATE_REQUIRED => 'TRUSTED_CLIENT_CERTIFICATE_REQUIRED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SslMode::class, \Google\Cloud\Sql\V1\IpConfiguration_SslMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php new file mode 100644 index 000000000000..c4b273578314 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/IpMapping.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1.IpMapping + */ +class IpMapping extends \Google\Protobuf\Internal\Message +{ + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; + */ + protected $type = 0; + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + */ + protected $ip_address = ''; + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + */ + protected $time_to_retire = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * @type string $ip_address + * The IP address assigned. + * @type \Google\Protobuf\Timestamp $time_to_retire + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlIpAddressType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlIpAddressType::class); + $this->type = $var; + + return $this; + } + + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeToRetire() + { + return $this->time_to_retire; + } + + public function hasTimeToRetire() + { + return isset($this->time_to_retire); + } + + public function clearTimeToRetire() + { + unset($this->time_to_retire); + } + + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeToRetire($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_to_retire = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php new file mode 100644 index 000000000000..d7c676367daa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/LocationPreference.php @@ -0,0 +1,193 @@ +google.cloud.sql.v1.LocationPreference + */ +class LocationPreference extends \Google\Protobuf\Internal\Message +{ + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @deprecated + */ + protected $follow_gae_application = ''; + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + */ + protected $zone = ''; + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + */ + protected $secondary_zone = ''; + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $follow_gae_application + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * @type string $zone + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * @type string $secondary_zone + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * @type string $kind + * This is always `sql#locationPreference`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getFollowGaeApplication() + { + @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); + return $this->follow_gae_application; + } + + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setFollowGaeApplication($var) + { + @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->follow_gae_application = $var; + + return $this; + } + + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + * @return string + */ + public function getSecondaryZone() + { + return $this->secondary_zone; + } + + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + * @param string $var + * @return $this + */ + public function setSecondaryZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_zone = $var; + + return $this; + } + + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php new file mode 100644 index 000000000000..e33837d44c42 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MaintenanceWindow.php @@ -0,0 +1,252 @@ +google.cloud.sql.v1.MaintenanceWindow + */ +class MaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + */ + protected $hour = null; + /** + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + */ + protected $day = null; + /** + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; + */ + protected $update_track = 0; + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $hour + * hour of day - 0 to 23. + * @type \Google\Protobuf\Int32Value $day + * day of week (1-7), starting on Monday. + * @type int $update_track + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * @type string $kind + * This is always `sql#maintenanceWindow`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getHour() + { + return $this->hour; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Returns the unboxed value from getHour() + + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @return int|null + */ + public function getHourUnwrapped() + { + return $this->readWrapperValue("hour"); + } + + /** + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->hour = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @param int|null $var + * @return $this + */ + public function setHourUnwrapped($var) + { + $this->writeWrapperValue("hour", $var); + return $this;} + + /** + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getDay() + { + return $this->day; + } + + public function hasDay() + { + return isset($this->day); + } + + public function clearDay() + { + unset($this->day); + } + + /** + * Returns the unboxed value from getDay() + + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @return int|null + */ + public function getDayUnwrapped() + { + return $this->readWrapperValue("day"); + } + + /** + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->day = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @param int|null $var + * @return $this + */ + public function setDayUnwrapped($var) + { + $this->writeWrapperValue("day", $var); + return $this;} + + /** + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; + * @return int + */ + public function getUpdateTrack() + { + return $this->update_track; + } + + /** + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlUpdateTrack update_track = 3; + * @param int $var + * @return $this + */ + public function setUpdateTrack($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlUpdateTrack::class); + $this->update_track = $var; + + return $this; + } + + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php new file mode 100644 index 000000000000..f341b4701919 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlReplicaConfiguration.php @@ -0,0 +1,548 @@ +google.cloud.sql.v1.MySqlReplicaConfiguration + */ +class MySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + */ + protected $dump_file_path = ''; + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + */ + protected $password = ''; + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + */ + protected $connect_retry_interval = null; + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + */ + protected $master_heartbeat_period = null; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + */ + protected $ca_certificate = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + */ + protected $client_certificate = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + */ + protected $client_key = ''; + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + */ + protected $ssl_cipher = ''; + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + */ + protected $verify_server_certificate = null; + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dump_file_path + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * @type string $username + * The username for the replication connection. + * @type string $password + * The password for the replication connection. + * @type \Google\Protobuf\Int32Value $connect_retry_interval + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * @type \Google\Protobuf\Int64Value $master_heartbeat_period + * Interval in milliseconds between replication heartbeats. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * @type string $ssl_cipher + * A list of permissible ciphers to use for SSL encryption. + * @type \Google\Protobuf\BoolValue $verify_server_certificate + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * @type string $kind + * This is always `sql#mysqlReplicaConfiguration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + * @return string + */ + public function getDumpFilePath() + { + return $this->dump_file_path; + } + + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + * @param string $var + * @return $this + */ + public function setDumpFilePath($var) + { + GPBUtil::checkString($var, True); + $this->dump_file_path = $var; + + return $this; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @return \Google\Protobuf\Int32Value|null + */ + public function getConnectRetryInterval() + { + return $this->connect_retry_interval; + } + + public function hasConnectRetryInterval() + { + return isset($this->connect_retry_interval); + } + + public function clearConnectRetryInterval() + { + unset($this->connect_retry_interval); + } + + /** + * Returns the unboxed value from getConnectRetryInterval() + + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @return int|null + */ + public function getConnectRetryIntervalUnwrapped() + { + return $this->readWrapperValue("connect_retry_interval"); + } + + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setConnectRetryInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->connect_retry_interval = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @param int|null $var + * @return $this + */ + public function setConnectRetryIntervalUnwrapped($var) + { + $this->writeWrapperValue("connect_retry_interval", $var); + return $this;} + + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMasterHeartbeatPeriod() + { + return $this->master_heartbeat_period; + } + + public function hasMasterHeartbeatPeriod() + { + return isset($this->master_heartbeat_period); + } + + public function clearMasterHeartbeatPeriod() + { + unset($this->master_heartbeat_period); + } + + /** + * Returns the unboxed value from getMasterHeartbeatPeriod() + + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @return int|string|null + */ + public function getMasterHeartbeatPeriodUnwrapped() + { + return $this->readWrapperValue("master_heartbeat_period"); + } + + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMasterHeartbeatPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->master_heartbeat_period = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @param int|string|null $var + * @return $this + */ + public function setMasterHeartbeatPeriodUnwrapped($var) + { + $this->writeWrapperValue("master_heartbeat_period", $var); + return $this;} + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + * @return string + */ + public function getSslCipher() + { + return $this->ssl_cipher; + } + + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + * @param string $var + * @return $this + */ + public function setSslCipher($var) + { + GPBUtil::checkString($var, True); + $this->ssl_cipher = $var; + + return $this; + } + + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @return \Google\Protobuf\BoolValue|null + */ + public function getVerifyServerCertificate() + { + return $this->verify_server_certificate; + } + + public function hasVerifyServerCertificate() + { + return isset($this->verify_server_certificate); + } + + public function clearVerifyServerCertificate() + { + unset($this->verify_server_certificate); + } + + /** + * Returns the unboxed value from getVerifyServerCertificate() + + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @return bool|null + */ + public function getVerifyServerCertificateUnwrapped() + { + return $this->readWrapperValue("verify_server_certificate"); + } + + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setVerifyServerCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->verify_server_certificate = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @param bool|null $var + * @return $this + */ + public function setVerifyServerCertificateUnwrapped($var) + { + $this->writeWrapperValue("verify_server_certificate", $var); + return $this;} + + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php new file mode 100644 index 000000000000..bc03053dd3ac --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/MySqlSyncConfig.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.MySqlSyncConfig + */ +class MySqlSyncConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; + */ + private $initial_sync_flags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Sql\V1\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $initial_sync_flags + * Flags to use for the initial dump. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInitialSyncFlags() + { + return $this->initial_sync_flags; + } + + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SyncFlags initial_sync_flags = 1; + * @param array<\Google\Cloud\Sql\V1\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInitialSyncFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SyncFlags::class); + $this->initial_sync_flags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php new file mode 100644 index 000000000000..23b8294b885a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OnPremisesConfiguration.php @@ -0,0 +1,353 @@ +google.cloud.sql.v1.OnPremisesConfiguration + */ +class OnPremisesConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + */ + protected $host_port = ''; + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + */ + protected $username = ''; + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + */ + protected $password = ''; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + */ + protected $ca_certificate = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + */ + protected $client_certificate = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + */ + protected $client_key = ''; + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + */ + protected $dump_file_path = ''; + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; + */ + protected $source_instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_port + * The host and port of the on-premises instance in host:port format + * @type string $kind + * This is always `sql#onPremisesConfiguration`. + * @type string $username + * The username for connecting to on-premises instance. + * @type string $password + * The password for connecting to on-premises instance. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * @type string $dump_file_path + * The dump file to create the Cloud SQL replica. + * @type \Google\Cloud\Sql\V1\InstanceReference $source_instance + * The reference to Cloud SQL instance if the source is Cloud SQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + * @return string + */ + public function getHostPort() + { + return $this->host_port; + } + + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + * @param string $var + * @return $this + */ + public function setHostPort($var) + { + GPBUtil::checkString($var, True); + $this->host_port = $var; + + return $this; + } + + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + * @return string + */ + public function getDumpFilePath() + { + return $this->dump_file_path; + } + + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + * @param string $var + * @return $this + */ + public function setDumpFilePath($var) + { + GPBUtil::checkString($var, True); + $this->dump_file_path = $var; + + return $this; + } + + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; + * @return \Google\Cloud\Sql\V1\InstanceReference|null + */ + public function getSourceInstance() + { + return $this->source_instance; + } + + public function hasSourceInstance() + { + return isset($this->source_instance); + } + + public function clearSourceInstance() + { + unset($this->source_instance); + } + + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1.InstanceReference source_instance = 15; + * @param \Google\Cloud\Sql\V1\InstanceReference $var + * @return $this + */ + public function setSourceInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstanceReference::class); + $this->source_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php new file mode 100644 index 000000000000..ed7f1506f616 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation.php @@ -0,0 +1,814 @@ +google.cloud.sql.v1.Operation + */ +class Operation extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Generated from protobuf field string target_link = 2; + */ + protected $target_link = ''; + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; + */ + protected $status = 0; + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + */ + protected $user = ''; + /** + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + */ + protected $insert_time = null; + /** + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + */ + protected $start_time = null; + /** + * The time this operation finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + */ + protected $end_time = null; + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; + */ + protected $error = null; + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; + */ + protected $api_warning = null; + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; + */ + protected $operation_type = 0; + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; + */ + protected $import_context = null; + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; + */ + protected $export_context = null; + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; + */ + protected $backup_context = null; + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + */ + protected $name = ''; + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + */ + protected $target_id = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + */ + protected $self_link = ''; + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + */ + protected $target_project = ''; + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + */ + protected $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operation`. + * @type string $target_link + * @type int $status + * The status of an operation. + * @type string $user + * The email address of the user who initiated this operation. + * @type \Google\Protobuf\Timestamp $insert_time + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Cloud\Sql\V1\OperationErrors $error + * If errors occurred during processing of this operation, this field will be + * populated. + * @type \Google\Cloud\Sql\V1\ApiWarning $api_warning + * An Admin API warning message. + * @type int $operation_type + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * @type \Google\Cloud\Sql\V1\ImportContext $import_context + * The context for import operation, if applicable. + * @type \Google\Cloud\Sql\V1\ExportContext $export_context + * The context for export operation, if applicable. + * @type \Google\Cloud\Sql\V1\BackupContext $backup_context + * The context for backup operation, if applicable. + * @type string $name + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * @type string $target_id + * Name of the database instance related to this operation. + * @type string $self_link + * The URI of this resource. + * @type string $target_project + * The project ID of the target instance related to this operation. + * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * The context for acquire SSRS lease operation, if applicable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Generated from protobuf field string target_link = 2; + * @return string + */ + public function getTargetLink() + { + return $this->target_link; + } + + /** + * Generated from protobuf field string target_link = 2; + * @param string $var + * @return $this + */ + public function setTargetLink($var) + { + GPBUtil::checkString($var, True); + $this->target_link = $var; + + return $this; + } + + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationStatus status = 3; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Operation\SqlOperationStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInsertTime() + { + return $this->insert_time; + } + + public function hasInsertTime() + { + return isset($this->insert_time); + } + + public function clearInsertTime() + { + unset($this->insert_time); + } + + /** + * The time this operation was enqueued in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInsertTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->insert_time = $var; + + return $this; + } + + /** + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @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); + } + + /** + * The time this operation actually started in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @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); + } + + /** + * The time this operation finished in UTC timezone in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; + * @return \Google\Cloud\Sql\V1\OperationErrors|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1.OperationErrors error = 8; + * @param \Google\Cloud\Sql\V1\OperationErrors $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\OperationErrors::class); + $this->error = $var; + + return $this; + } + + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; + * @return \Google\Cloud\Sql\V1\ApiWarning|null + */ + public function getApiWarning() + { + return $this->api_warning; + } + + public function hasApiWarning() + { + return isset($this->api_warning); + } + + public function clearApiWarning() + { + unset($this->api_warning); + } + + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1.ApiWarning api_warning = 19; + * @param \Google\Cloud\Sql\V1\ApiWarning $var + * @return $this + */ + public function setApiWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ApiWarning::class); + $this->api_warning = $var; + + return $this; + } + + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; + * @return int + */ + public function getOperationType() + { + return $this->operation_type; + } + + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1.Operation.SqlOperationType operation_type = 9; + * @param int $var + * @return $this + */ + public function setOperationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Operation\SqlOperationType::class); + $this->operation_type = $var; + + return $this; + } + + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; + * @return \Google\Cloud\Sql\V1\ImportContext|null + */ + public function getImportContext() + { + return $this->import_context; + } + + public function hasImportContext() + { + return isset($this->import_context); + } + + public function clearImportContext() + { + unset($this->import_context); + } + + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext import_context = 10; + * @param \Google\Cloud\Sql\V1\ImportContext $var + * @return $this + */ + public function setImportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext::class); + $this->import_context = $var; + + return $this; + } + + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; + * @return \Google\Cloud\Sql\V1\ExportContext|null + */ + public function getExportContext() + { + return $this->export_context; + } + + public function hasExportContext() + { + return isset($this->export_context); + } + + public function clearExportContext() + { + unset($this->export_context); + } + + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.ExportContext export_context = 11; + * @param \Google\Cloud\Sql\V1\ExportContext $var + * @return $this + */ + public function setExportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ExportContext::class); + $this->export_context = $var; + + return $this; + } + + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; + * @return \Google\Cloud\Sql\V1\BackupContext|null + */ + public function getBackupContext() + { + return $this->backup_context; + } + + public function hasBackupContext() + { + return isset($this->backup_context); + } + + public function clearBackupContext() + { + unset($this->backup_context); + } + + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupContext backup_context = 17; + * @param \Google\Cloud\Sql\V1\BackupContext $var + * @return $this + */ + public function setBackupContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupContext::class); + $this->backup_context = $var; + + return $this; + } + + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + * @return string + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + * @param string $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkString($var, True); + $this->target_id = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php new file mode 100644 index 000000000000..424ad5206f10 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationStatus.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.Operation.SqlOperationStatus + */ +class SqlOperationStatus +{ + /** + * The state of the operation is unknown. + * + * Generated from protobuf enum SQL_OPERATION_STATUS_UNSPECIFIED = 0; + */ + const SQL_OPERATION_STATUS_UNSPECIFIED = 0; + /** + * The operation has been queued, but has not started yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The operation is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The operation completed. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + + private static $valueToName = [ + self::SQL_OPERATION_STATUS_UNSPECIFIED => 'SQL_OPERATION_STATUS_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOperationStatus::class, \Google\Cloud\Sql\V1\Operation_SqlOperationStatus::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php new file mode 100644 index 000000000000..08f1749a7de5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Operation/SqlOperationType.php @@ -0,0 +1,342 @@ +google.cloud.sql.v1.Operation.SqlOperationType + */ +class SqlOperationType +{ + /** + * Unknown operation type. + * + * Generated from protobuf enum SQL_OPERATION_TYPE_UNSPECIFIED = 0; + */ + const SQL_OPERATION_TYPE_UNSPECIFIED = 0; + /** + * Imports data into a Cloud SQL instance. + * + * Generated from protobuf enum IMPORT = 1; + */ + const IMPORT = 1; + /** + * Exports data from a Cloud SQL instance to a Cloud Storage + * bucket. + * + * Generated from protobuf enum EXPORT = 2; + */ + const EXPORT = 2; + /** + * Creates a new Cloud SQL instance. + * + * Generated from protobuf enum CREATE = 3; + */ + const CREATE = 3; + /** + * Updates the settings of a Cloud SQL instance. + * + * Generated from protobuf enum UPDATE = 4; + */ + const UPDATE = 4; + /** + * Deletes a Cloud SQL instance. + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * Restarts the Cloud SQL instance. + * + * Generated from protobuf enum RESTART = 6; + */ + const RESTART = 6; + /** + * Generated from protobuf enum BACKUP = 7 [deprecated = true]; + */ + const BACKUP = 7; + /** + * Generated from protobuf enum SNAPSHOT = 8 [deprecated = true]; + */ + const SNAPSHOT = 8; + /** + * Performs instance backup. + * + * Generated from protobuf enum BACKUP_VOLUME = 9; + */ + const BACKUP_VOLUME = 9; + /** + * Deletes an instance backup. + * + * Generated from protobuf enum DELETE_VOLUME = 10; + */ + const DELETE_VOLUME = 10; + /** + * Restores an instance backup. + * + * Generated from protobuf enum RESTORE_VOLUME = 11; + */ + const RESTORE_VOLUME = 11; + /** + * Injects a privileged user in mysql for MOB instances. + * + * Generated from protobuf enum INJECT_USER = 12; + */ + const INJECT_USER = 12; + /** + * Clones a Cloud SQL instance. + * + * Generated from protobuf enum CLONE = 14; + */ + const PBCLONE = 14; + /** + * Stops replication on a Cloud SQL read replica instance. + * + * Generated from protobuf enum STOP_REPLICA = 15; + */ + const STOP_REPLICA = 15; + /** + * Starts replication on a Cloud SQL read replica instance. + * + * Generated from protobuf enum START_REPLICA = 16; + */ + const START_REPLICA = 16; + /** + * Promotes a Cloud SQL replica instance. + * + * Generated from protobuf enum PROMOTE_REPLICA = 17; + */ + const PROMOTE_REPLICA = 17; + /** + * Creates a Cloud SQL replica instance. + * + * Generated from protobuf enum CREATE_REPLICA = 18; + */ + const CREATE_REPLICA = 18; + /** + * Creates a new user in a Cloud SQL instance. + * + * Generated from protobuf enum CREATE_USER = 19; + */ + const CREATE_USER = 19; + /** + * Deletes a user from a Cloud SQL instance. + * + * Generated from protobuf enum DELETE_USER = 20; + */ + const DELETE_USER = 20; + /** + * Updates an existing user in a Cloud SQL instance. + * + * Generated from protobuf enum UPDATE_USER = 21; + */ + const UPDATE_USER = 21; + /** + * Creates a database in the Cloud SQL instance. + * + * Generated from protobuf enum CREATE_DATABASE = 22; + */ + const CREATE_DATABASE = 22; + /** + * Deletes a database in the Cloud SQL instance. + * + * Generated from protobuf enum DELETE_DATABASE = 23; + */ + const DELETE_DATABASE = 23; + /** + * Updates a database in the Cloud SQL instance. + * + * Generated from protobuf enum UPDATE_DATABASE = 24; + */ + const UPDATE_DATABASE = 24; + /** + * Performs failover of an HA-enabled Cloud SQL + * failover replica. + * + * Generated from protobuf enum FAILOVER = 25; + */ + const FAILOVER = 25; + /** + * Deletes the backup taken by a backup run. + * + * Generated from protobuf enum DELETE_BACKUP = 26; + */ + const DELETE_BACKUP = 26; + /** + * Generated from protobuf enum RECREATE_REPLICA = 27; + */ + const RECREATE_REPLICA = 27; + /** + * Truncates a general or slow log table in MySQL. + * + * Generated from protobuf enum TRUNCATE_LOG = 28; + */ + const TRUNCATE_LOG = 28; + /** + * Demotes the stand-alone instance to be a Cloud SQL + * read replica for an external database server. + * + * Generated from protobuf enum DEMOTE_MASTER = 29; + */ + const DEMOTE_MASTER = 29; + /** + * Indicates that the instance is currently in maintenance. Maintenance + * typically causes the instance to be unavailable for 1-3 minutes. + * + * Generated from protobuf enum MAINTENANCE = 30; + */ + const MAINTENANCE = 30; + /** + * This field is deprecated, and will be removed in future version of API. + * + * Generated from protobuf enum ENABLE_PRIVATE_IP = 31 [deprecated = true]; + */ + const ENABLE_PRIVATE_IP = 31; + /** + * Generated from protobuf enum DEFER_MAINTENANCE = 32 [deprecated = true]; + */ + const DEFER_MAINTENANCE = 32; + /** + * Creates clone instance. + * + * Generated from protobuf enum CREATE_CLONE = 33 [deprecated = true]; + */ + const CREATE_CLONE = 33; + /** + * Reschedule maintenance to another time. + * + * Generated from protobuf enum RESCHEDULE_MAINTENANCE = 34; + */ + const RESCHEDULE_MAINTENANCE = 34; + /** + * Starts external sync of a Cloud SQL EM replica to an external primary + * instance. + * + * Generated from protobuf enum START_EXTERNAL_SYNC = 35; + */ + const START_EXTERNAL_SYNC = 35; + /** + * Recovers logs from an instance's old data disk. + * + * Generated from protobuf enum LOG_CLEANUP = 36; + */ + const LOG_CLEANUP = 36; + /** + * Performs auto-restart of an HA-enabled Cloud SQL database for auto + * recovery. + * + * Generated from protobuf enum AUTO_RESTART = 37; + */ + const AUTO_RESTART = 37; + /** + * Re-encrypts CMEK instances with latest key version. + * + * Generated from protobuf enum REENCRYPT = 38; + */ + const REENCRYPT = 38; + /** + * Switches over to replica instance from primary. + * + * Generated from protobuf enum SWITCHOVER = 39; + */ + const SWITCHOVER = 39; + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42; + */ + const ACQUIRE_SSRS_LEASE = 42; + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum RELEASE_SSRS_LEASE = 43; + */ + const RELEASE_SSRS_LEASE = 43; + /** + * Reconfigures old primary after a promote replica operation. Effect of a + * promote operation to the old primary is executed in this operation, + * asynchronously from the promote replica operation executed to the + * replica. + * + * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44; + */ + const RECONFIGURE_OLD_PRIMARY = 44; + + private static $valueToName = [ + self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED', + self::IMPORT => 'IMPORT', + self::EXPORT => 'EXPORT', + self::CREATE => 'CREATE', + self::UPDATE => 'UPDATE', + self::DELETE => 'DELETE', + self::RESTART => 'RESTART', + self::BACKUP => 'BACKUP', + self::SNAPSHOT => 'SNAPSHOT', + self::BACKUP_VOLUME => 'BACKUP_VOLUME', + self::DELETE_VOLUME => 'DELETE_VOLUME', + self::RESTORE_VOLUME => 'RESTORE_VOLUME', + self::INJECT_USER => 'INJECT_USER', + self::PBCLONE => 'CLONE', + self::STOP_REPLICA => 'STOP_REPLICA', + self::START_REPLICA => 'START_REPLICA', + self::PROMOTE_REPLICA => 'PROMOTE_REPLICA', + self::CREATE_REPLICA => 'CREATE_REPLICA', + self::CREATE_USER => 'CREATE_USER', + self::DELETE_USER => 'DELETE_USER', + self::UPDATE_USER => 'UPDATE_USER', + self::CREATE_DATABASE => 'CREATE_DATABASE', + self::DELETE_DATABASE => 'DELETE_DATABASE', + self::UPDATE_DATABASE => 'UPDATE_DATABASE', + self::FAILOVER => 'FAILOVER', + self::DELETE_BACKUP => 'DELETE_BACKUP', + self::RECREATE_REPLICA => 'RECREATE_REPLICA', + self::TRUNCATE_LOG => 'TRUNCATE_LOG', + self::DEMOTE_MASTER => 'DEMOTE_MASTER', + self::MAINTENANCE => 'MAINTENANCE', + self::ENABLE_PRIVATE_IP => 'ENABLE_PRIVATE_IP', + self::DEFER_MAINTENANCE => 'DEFER_MAINTENANCE', + self::CREATE_CLONE => 'CREATE_CLONE', + self::RESCHEDULE_MAINTENANCE => 'RESCHEDULE_MAINTENANCE', + self::START_EXTERNAL_SYNC => 'START_EXTERNAL_SYNC', + self::LOG_CLEANUP => 'LOG_CLEANUP', + self::AUTO_RESTART => 'AUTO_RESTART', + self::REENCRYPT => 'REENCRYPT', + self::SWITCHOVER => 'SWITCHOVER', + self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE', + self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE', + self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOperationType::class, \Google\Cloud\Sql\V1\Operation_SqlOperationType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php new file mode 100644 index 000000000000..9983939c0bda --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationError.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.OperationError + */ +class OperationError extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + */ + protected $code = ''; + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationError`. + * @type string $code + * Identifies the specific error that occurred. + * @type string $message + * Additional information about the error encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php new file mode 100644 index 000000000000..6e439bac00ad --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationErrors.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.OperationErrors + */ +class OperationErrors extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationErrors`. + * @type array<\Google\Cloud\Sql\V1\OperationError>|\Google\Protobuf\Internal\RepeatedField $errors + * The list of errors encountered while processing this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.OperationError errors = 2; + * @param array<\Google\Cloud\Sql\V1\OperationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\OperationError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php new file mode 100644 index 000000000000..cfa3c41fcd72 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/OperationsListResponse.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1.OperationsListResponse + */ +class OperationsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationsList`. + * @type array<\Google\Cloud\Sql\V1\Operation>|\Google\Protobuf\Internal\RepeatedField $items + * List of operation resources. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Operation items = 2; + * @param array<\Google\Cloud\Sql\V1\Operation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Operation::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php new file mode 100644 index 000000000000..04e5de0765ce --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordStatus.php @@ -0,0 +1,111 @@ +google.cloud.sql.v1.PasswordStatus + */ +class PasswordStatus extends \Google\Protobuf\Internal\Message +{ + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + */ + protected $locked = false; + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + */ + protected $password_expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $locked + * If true, user does not have login privileges. + * @type \Google\Protobuf\Timestamp $password_expiration_time + * The expiration time of the current password. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPasswordExpirationTime() + { + return $this->password_expiration_time; + } + + public function hasPasswordExpirationTime() + { + return isset($this->password_expiration_time); + } + + public function clearPasswordExpirationTime() + { + unset($this->password_expiration_time); + } + + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPasswordExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->password_expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php new file mode 100644 index 000000000000..41c3210abebc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy.php @@ -0,0 +1,484 @@ +google.cloud.sql.v1.PasswordValidationPolicy + */ +class PasswordValidationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + */ + protected $min_length = null; + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; + */ + protected $complexity = 0; + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + */ + protected $reuse_interval = null; + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + */ + protected $disallow_username_substring = null; + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + */ + protected $password_change_interval = null; + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + */ + protected $enable_password_policy = null; + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @deprecated + */ + protected $disallow_compromised_credentials = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $min_length + * Minimum number of characters allowed. + * @type int $complexity + * The complexity of the password. + * @type \Google\Protobuf\Int32Value $reuse_interval + * Number of previous passwords that cannot be reused. + * @type \Google\Protobuf\BoolValue $disallow_username_substring + * Disallow username as a part of the password. + * @type \Google\Protobuf\Duration $password_change_interval + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * @type \Google\Protobuf\BoolValue $enable_password_policy + * Whether the password policy is enabled or not. + * @type \Google\Protobuf\BoolValue $disallow_compromised_credentials + * This field is deprecated and will be removed in a future version of the + * API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getMinLength() + { + return $this->min_length; + } + + public function hasMinLength() + { + return isset($this->min_length); + } + + public function clearMinLength() + { + unset($this->min_length); + } + + /** + * Returns the unboxed value from getMinLength() + + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @return int|null + */ + public function getMinLengthUnwrapped() + { + return $this->readWrapperValue("min_length"); + } + + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setMinLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->min_length = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @param int|null $var + * @return $this + */ + public function setMinLengthUnwrapped($var) + { + $this->writeWrapperValue("min_length", $var); + return $this;} + + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; + * @return int + */ + public function getComplexity() + { + return $this->complexity; + } + + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy.Complexity complexity = 2; + * @param int $var + * @return $this + */ + public function setComplexity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\PasswordValidationPolicy\Complexity::class); + $this->complexity = $var; + + return $this; + } + + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @return \Google\Protobuf\Int32Value|null + */ + public function getReuseInterval() + { + return $this->reuse_interval; + } + + public function hasReuseInterval() + { + return isset($this->reuse_interval); + } + + public function clearReuseInterval() + { + unset($this->reuse_interval); + } + + /** + * Returns the unboxed value from getReuseInterval() + + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @return int|null + */ + public function getReuseIntervalUnwrapped() + { + return $this->readWrapperValue("reuse_interval"); + } + + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setReuseInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->reuse_interval = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @param int|null $var + * @return $this + */ + public function setReuseIntervalUnwrapped($var) + { + $this->writeWrapperValue("reuse_interval", $var); + return $this;} + + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDisallowUsernameSubstring() + { + return $this->disallow_username_substring; + } + + public function hasDisallowUsernameSubstring() + { + return isset($this->disallow_username_substring); + } + + public function clearDisallowUsernameSubstring() + { + unset($this->disallow_username_substring); + } + + /** + * Returns the unboxed value from getDisallowUsernameSubstring() + + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @return bool|null + */ + public function getDisallowUsernameSubstringUnwrapped() + { + return $this->readWrapperValue("disallow_username_substring"); + } + + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDisallowUsernameSubstring($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disallow_username_substring = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @param bool|null $var + * @return $this + */ + public function setDisallowUsernameSubstringUnwrapped($var) + { + $this->writeWrapperValue("disallow_username_substring", $var); + return $this;} + + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getPasswordChangeInterval() + { + return $this->password_change_interval; + } + + public function hasPasswordChangeInterval() + { + return isset($this->password_change_interval); + } + + public function clearPasswordChangeInterval() + { + unset($this->password_change_interval); + } + + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPasswordChangeInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->password_change_interval = $var; + + return $this; + } + + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnablePasswordPolicy() + { + return $this->enable_password_policy; + } + + public function hasEnablePasswordPolicy() + { + return isset($this->enable_password_policy); + } + + public function clearEnablePasswordPolicy() + { + unset($this->enable_password_policy); + } + + /** + * Returns the unboxed value from getEnablePasswordPolicy() + + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @return bool|null + */ + public function getEnablePasswordPolicyUnwrapped() + { + return $this->readWrapperValue("enable_password_policy"); + } + + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnablePasswordPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_password_policy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @param bool|null $var + * @return $this + */ + public function setEnablePasswordPolicyUnwrapped($var) + { + $this->writeWrapperValue("enable_password_policy", $var); + return $this;} + + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return $this->disallow_compromised_credentials; + } + + public function hasDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return isset($this->disallow_compromised_credentials); + } + + public function clearDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + unset($this->disallow_compromised_credentials); + } + + /** + * Returns the unboxed value from getDisallowCompromisedCredentials() + + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @return bool|null + */ + public function getDisallowCompromisedCredentialsUnwrapped() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("disallow_compromised_credentials"); + } + + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setDisallowCompromisedCredentials($var) + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disallow_compromised_credentials = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setDisallowCompromisedCredentialsUnwrapped($var) + { + $this->writeWrapperValue("disallow_compromised_credentials", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php new file mode 100644 index 000000000000..30292b5fb504 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PasswordValidationPolicy/Complexity.php @@ -0,0 +1,58 @@ +google.cloud.sql.v1.PasswordValidationPolicy.Complexity + */ +class Complexity +{ + /** + * Complexity check is not specified. + * + * Generated from protobuf enum COMPLEXITY_UNSPECIFIED = 0; + */ + const COMPLEXITY_UNSPECIFIED = 0; + /** + * A combination of lowercase, uppercase, numeric, and non-alphanumeric + * characters. + * + * Generated from protobuf enum COMPLEXITY_DEFAULT = 1; + */ + const COMPLEXITY_DEFAULT = 1; + + private static $valueToName = [ + self::COMPLEXITY_UNSPECIFIED => 'COMPLEXITY_UNSPECIFIED', + self::COMPLEXITY_DEFAULT => 'COMPLEXITY_DEFAULT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Complexity::class, \Google\Cloud\Sql\V1\PasswordValidationPolicy_Complexity::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php new file mode 100644 index 000000000000..9b78ebbaf0a0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PerformDiskShrinkContext.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.PerformDiskShrinkContext + */ +class PerformDiskShrinkContext extends \Google\Protobuf\Internal\Message +{ + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + */ + protected $target_size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $target_size_gb + * The target disk shrink size in GigaBytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + * @return int|string + */ + public function getTargetSizeGb() + { + return $this->target_size_gb; + } + + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + * @param int|string $var + * @return $this + */ + public function setTargetSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->target_size_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php new file mode 100644 index 000000000000..9d8bb9a95229 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/PscConfig.php @@ -0,0 +1,127 @@ +google.cloud.sql.v1.PscConfig + */ +class PscConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + */ + protected $psc_enabled = null; + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_consumer_projects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $psc_enabled + * Whether PSC connectivity is enabled for this instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_consumer_projects + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + * @return bool + */ + public function getPscEnabled() + { + return isset($this->psc_enabled) ? $this->psc_enabled : false; + } + + public function hasPscEnabled() + { + return isset($this->psc_enabled); + } + + public function clearPscEnabled() + { + unset($this->psc_enabled); + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + * @param bool $var + * @return $this + */ + public function setPscEnabled($var) + { + GPBUtil::checkBool($var); + $this->psc_enabled = $var; + + return $this; + } + + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedConsumerProjects() + { + return $this->allowed_consumer_projects; + } + + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedConsumerProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_consumer_projects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php new file mode 100644 index 000000000000..98e162465cd0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicaConfiguration.php @@ -0,0 +1,309 @@ +google.cloud.sql.v1.ReplicaConfiguration + */ +class ReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; + */ + protected $mysql_replica_configuration = null; + /** + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + */ + protected $failover_target = null; + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cascadable_replica = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#replicaConfiguration`. + * @type \Google\Cloud\Sql\V1\MySqlReplicaConfiguration $mysql_replica_configuration + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * @type \Google\Protobuf\BoolValue $failover_target + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * @type \Google\Protobuf\BoolValue $cascadable_replica + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; + * @return \Google\Cloud\Sql\V1\MySqlReplicaConfiguration|null + */ + public function getMysqlReplicaConfiguration() + { + return $this->mysql_replica_configuration; + } + + public function hasMysqlReplicaConfiguration() + { + return isset($this->mysql_replica_configuration); + } + + public function clearMysqlReplicaConfiguration() + { + unset($this->mysql_replica_configuration); + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlReplicaConfiguration mysql_replica_configuration = 2; + * @param \Google\Cloud\Sql\V1\MySqlReplicaConfiguration $var + * @return $this + */ + public function setMysqlReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlReplicaConfiguration::class); + $this->mysql_replica_configuration = $var; + + return $this; + } + + /** + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getFailoverTarget() + { + return $this->failover_target; + } + + public function hasFailoverTarget() + { + return isset($this->failover_target); + } + + public function clearFailoverTarget() + { + unset($this->failover_target); + } + + /** + * Returns the unboxed value from getFailoverTarget() + + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @return bool|null + */ + public function getFailoverTargetUnwrapped() + { + return $this->readWrapperValue("failover_target"); + } + + /** + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setFailoverTarget($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->failover_target = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Specifies if the replica is the failover target. If the field is set to + * `true`, the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @param bool|null $var + * @return $this + */ + public function setFailoverTargetUnwrapped($var) + { + $this->writeWrapperValue("failover_target", $var); + return $this;} + + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getCascadableReplica() + { + return $this->cascadable_replica; + } + + public function hasCascadableReplica() + { + return isset($this->cascadable_replica); + } + + public function clearCascadableReplica() + { + unset($this->cascadable_replica); + } + + /** + * Returns the unboxed value from getCascadableReplica() + + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getCascadableReplicaUnwrapped() + { + return $this->readWrapperValue("cascadable_replica"); + } + + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setCascadableReplica($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->cascadable_replica = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setCascadableReplicaUnwrapped($var) + { + $this->writeWrapperValue("cascadable_replica", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php new file mode 100644 index 000000000000..c71e2fdd8abb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/ReplicationCluster.php @@ -0,0 +1,125 @@ +google.cloud.sql.v1.ReplicationCluster + */ +class ReplicationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $failover_dr_replica_name = ''; + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dr_replica = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $failover_dr_replica_name + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * @type bool $dr_replica + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFailoverDrReplicaName() + { + return $this->failover_dr_replica_name; + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFailoverDrReplicaName($var) + { + GPBUtil::checkString($var, True); + $this->failover_dr_replica_name = $var; + + return $this; + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDrReplica() + { + return $this->dr_replica; + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDrReplica($var) + { + GPBUtil::checkBool($var); + $this->dr_replica = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php new file mode 100644 index 000000000000..181d00941303 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RestoreBackupContext.php @@ -0,0 +1,170 @@ +google.cloud.sql.v1.RestoreBackupContext + */ +class RestoreBackupContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + */ + protected $backup_run_id = 0; + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + */ + protected $instance_id = ''; + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#restoreBackupContext`. + * @type int|string $backup_run_id + * The ID of the backup run to restore from. + * @type string $instance_id + * The ID of the instance that the backup was taken from. + * @type string $project + * The full project ID of the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + * @return int|string + */ + public function getBackupRunId() + { + return $this->backup_run_id; + } + + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + * @param int|string $var + * @return $this + */ + public function setBackupRunId($var) + { + GPBUtil::checkInt64($var); + $this->backup_run_id = $var; + + return $this; + } + + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php new file mode 100644 index 000000000000..ae676d1af208 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/RotateServerCaContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1.RotateServerCaContext + */ +class RotateServerCaContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + */ + protected $next_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#rotateServerCaContext`. + * @type string $next_version + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + * @return string + */ + public function getNextVersion() + { + return $this->next_version; + } + + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + * @param string $var + * @return $this + */ + public function setNextVersion($var) + { + GPBUtil::checkString($var, True); + $this->next_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php new file mode 100644 index 000000000000..4340c53e19b6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings.php @@ -0,0 +1,1773 @@ +google.cloud.sql.v1.Settings + */ +class Settings extends \Google\Protobuf\Internal\Message +{ + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + */ + protected $settings_version = null; + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @deprecated + */ + private $authorized_gae_applications; + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + */ + protected $tier = ''; + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + */ + private $user_labels; + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; + */ + protected $availability_type = 0; + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; + */ + protected $pricing_plan = 0; + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; + * @deprecated + */ + protected $replication_type = 0; + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + */ + protected $storage_auto_resize_limit = null; + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; + */ + protected $activation_policy = 0; + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; + */ + protected $ip_configuration = null; + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + */ + protected $storage_auto_resize = null; + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; + */ + protected $location_preference = null; + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; + */ + private $database_flags; + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; + */ + protected $data_disk_type = 0; + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; + */ + protected $maintenance_window = null; + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; + */ + protected $backup_configuration = null; + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + */ + protected $database_replication_enabled = null; + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @deprecated + */ + protected $crash_safe_replication_enabled = null; + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + */ + protected $data_disk_size_gb = null; + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; + */ + protected $active_directory_config = null; + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + */ + protected $collation = ''; + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; + */ + private $deny_maintenance_periods; + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; + */ + protected $insights_config = null; + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; + */ + protected $password_validation_policy = null; + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; + */ + protected $sql_server_audit_config = null; + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $edition = 0; + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; + */ + protected $connector_enforcement = 0; + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + */ + protected $deletion_protection_enabled = null; + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + */ + protected $time_zone = ''; + /** + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; + */ + protected $advanced_machine_features = null; + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; + */ + protected $data_cache_config = null; + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_google_ml_integration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $settings_version + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * @type array|\Google\Protobuf\Internal\RepeatedField $authorized_gae_applications + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * @type string $tier + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * @type string $kind + * This is always `sql#settings`. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * @type int $availability_type + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * @type int $pricing_plan + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * @type int $replication_type + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * @type \Google\Protobuf\Int64Value $storage_auto_resize_limit + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * @type int $activation_policy + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * @type \Google\Cloud\Sql\V1\IpConfiguration $ip_configuration + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * @type \Google\Protobuf\BoolValue $storage_auto_resize + * Configuration to increase storage size automatically. The default value is + * true. + * @type \Google\Cloud\Sql\V1\LocationPreference $location_preference + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * @type array<\Google\Cloud\Sql\V1\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $database_flags + * The database flags passed to the instance at startup. + * @type int $data_disk_type + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * @type \Google\Cloud\Sql\V1\MaintenanceWindow $maintenance_window + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * @type \Google\Cloud\Sql\V1\BackupConfiguration $backup_configuration + * The daily backup configuration for the instance. + * @type \Google\Protobuf\BoolValue $database_replication_enabled + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * @type \Google\Protobuf\BoolValue $crash_safe_replication_enabled + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * @type \Google\Protobuf\Int64Value $data_disk_size_gb + * The size of data disk, in GB. The data disk size minimum is 10GB. + * @type \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig $active_directory_config + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * @type string $collation + * The name of server Instance collation. + * @type array<\Google\Cloud\Sql\V1\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $deny_maintenance_periods + * Deny maintenance periods + * @type \Google\Cloud\Sql\V1\InsightsConfig $insights_config + * Insights configuration, for now relevant only for Postgres. + * @type \Google\Cloud\Sql\V1\PasswordValidationPolicy $password_validation_policy + * The local user password validation policy of the instance. + * @type \Google\Cloud\Sql\V1\SqlServerAuditConfig $sql_server_audit_config + * SQL Server specific audit configuration. + * @type int $edition + * Optional. The edition of the instance. + * @type int $connector_enforcement + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * @type \Google\Protobuf\BoolValue $deletion_protection_enabled + * Configuration to protect against accidental instance deletion. + * @type string $time_zone + * Server timezone, relevant only for Cloud SQL for SQL Server. + * @type \Google\Cloud\Sql\V1\AdvancedMachineFeatures $advanced_machine_features + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * @type \Google\Cloud\Sql\V1\DataCacheConfig $data_cache_config + * Configuration for data cache. + * @type \Google\Protobuf\BoolValue $enable_google_ml_integration + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @return \Google\Protobuf\Int64Value|null + */ + public function getSettingsVersion() + { + return $this->settings_version; + } + + public function hasSettingsVersion() + { + return isset($this->settings_version); + } + + public function clearSettingsVersion() + { + unset($this->settings_version); + } + + /** + * Returns the unboxed value from getSettingsVersion() + + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @return int|string|null + */ + public function getSettingsVersionUnwrapped() + { + return $this->readWrapperValue("settings_version"); + } + + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setSettingsVersion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->settings_version = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @param int|string|null $var + * @return $this + */ + public function setSettingsVersionUnwrapped($var) + { + $this->writeWrapperValue("settings_version", $var); + return $this;} + + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getAuthorizedGaeApplications() + { + @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); + return $this->authorized_gae_applications; + } + + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setAuthorizedGaeApplications($var) + { + @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->authorized_gae_applications = $arr; + + return $this; + } + + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + * @return string + */ + public function getTier() + { + return $this->tier; + } + + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + * @param string $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkString($var, True); + $this->tier = $var; + + return $this; + } + + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; + * @return int + */ + public function getAvailabilityType() + { + return $this->availability_type; + } + + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1.SqlAvailabilityType availability_type = 6; + * @param int $var + * @return $this + */ + public function setAvailabilityType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlAvailabilityType::class); + $this->availability_type = $var; + + return $this; + } + + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; + * @return int + */ + public function getPricingPlan() + { + return $this->pricing_plan; + } + + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlPricingPlan pricing_plan = 7; + * @param int $var + * @return $this + */ + public function setPricingPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlPricingPlan::class); + $this->pricing_plan = $var; + + return $this; + } + + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; + * @return int + * @deprecated + */ + public function getReplicationType() + { + @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); + return $this->replication_type; + } + + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlReplicationType replication_type = 8 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setReplicationType($var) + { + @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlReplicationType::class); + $this->replication_type = $var; + + return $this; + } + + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @return \Google\Protobuf\Int64Value|null + */ + public function getStorageAutoResizeLimit() + { + return $this->storage_auto_resize_limit; + } + + public function hasStorageAutoResizeLimit() + { + return isset($this->storage_auto_resize_limit); + } + + public function clearStorageAutoResizeLimit() + { + unset($this->storage_auto_resize_limit); + } + + /** + * Returns the unboxed value from getStorageAutoResizeLimit() + + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @return int|string|null + */ + public function getStorageAutoResizeLimitUnwrapped() + { + return $this->readWrapperValue("storage_auto_resize_limit"); + } + + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setStorageAutoResizeLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->storage_auto_resize_limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @param int|string|null $var + * @return $this + */ + public function setStorageAutoResizeLimitUnwrapped($var) + { + $this->writeWrapperValue("storage_auto_resize_limit", $var); + return $this;} + + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; + * @return int + */ + public function getActivationPolicy() + { + return $this->activation_policy; + } + + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.SqlActivationPolicy activation_policy = 10; + * @param int $var + * @return $this + */ + public function setActivationPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\SqlActivationPolicy::class); + $this->activation_policy = $var; + + return $this; + } + + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; + * @return \Google\Cloud\Sql\V1\IpConfiguration|null + */ + public function getIpConfiguration() + { + return $this->ip_configuration; + } + + public function hasIpConfiguration() + { + return isset($this->ip_configuration); + } + + public function clearIpConfiguration() + { + unset($this->ip_configuration); + } + + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration ip_configuration = 11; + * @param \Google\Cloud\Sql\V1\IpConfiguration $var + * @return $this + */ + public function setIpConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\IpConfiguration::class); + $this->ip_configuration = $var; + + return $this; + } + + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStorageAutoResize() + { + return $this->storage_auto_resize; + } + + public function hasStorageAutoResize() + { + return isset($this->storage_auto_resize); + } + + public function clearStorageAutoResize() + { + unset($this->storage_auto_resize); + } + + /** + * Returns the unboxed value from getStorageAutoResize() + + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @return bool|null + */ + public function getStorageAutoResizeUnwrapped() + { + return $this->readWrapperValue("storage_auto_resize"); + } + + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStorageAutoResize($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->storage_auto_resize = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @param bool|null $var + * @return $this + */ + public function setStorageAutoResizeUnwrapped($var) + { + $this->writeWrapperValue("storage_auto_resize", $var); + return $this;} + + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; + * @return \Google\Cloud\Sql\V1\LocationPreference|null + */ + public function getLocationPreference() + { + return $this->location_preference; + } + + public function hasLocationPreference() + { + return isset($this->location_preference); + } + + public function clearLocationPreference() + { + unset($this->location_preference); + } + + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.LocationPreference location_preference = 13; + * @param \Google\Cloud\Sql\V1\LocationPreference $var + * @return $this + */ + public function setLocationPreference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\LocationPreference::class); + $this->location_preference = $var; + + return $this; + } + + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabaseFlags() + { + return $this->database_flags; + } + + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DatabaseFlags database_flags = 14; + * @param array<\Google\Cloud\Sql\V1\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabaseFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DatabaseFlags::class); + $this->database_flags = $arr; + + return $this; + } + + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; + * @return int + */ + public function getDataDiskType() + { + return $this->data_disk_type; + } + + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlDataDiskType data_disk_type = 15; + * @param int $var + * @return $this + */ + public function setDataDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlDataDiskType::class); + $this->data_disk_type = $var; + + return $this; + } + + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; + * @return \Google\Cloud\Sql\V1\MaintenanceWindow|null + */ + public function getMaintenanceWindow() + { + return $this->maintenance_window; + } + + public function hasMaintenanceWindow() + { + return isset($this->maintenance_window); + } + + public function clearMaintenanceWindow() + { + unset($this->maintenance_window); + } + + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1.MaintenanceWindow maintenance_window = 16; + * @param \Google\Cloud\Sql\V1\MaintenanceWindow $var + * @return $this + */ + public function setMaintenanceWindow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MaintenanceWindow::class); + $this->maintenance_window = $var; + + return $this; + } + + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; + * @return \Google\Cloud\Sql\V1\BackupConfiguration|null + */ + public function getBackupConfiguration() + { + return $this->backup_configuration; + } + + public function hasBackupConfiguration() + { + return isset($this->backup_configuration); + } + + public function clearBackupConfiguration() + { + unset($this->backup_configuration); + } + + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.BackupConfiguration backup_configuration = 17; + * @param \Google\Cloud\Sql\V1\BackupConfiguration $var + * @return $this + */ + public function setBackupConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupConfiguration::class); + $this->backup_configuration = $var; + + return $this; + } + + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDatabaseReplicationEnabled() + { + return $this->database_replication_enabled; + } + + public function hasDatabaseReplicationEnabled() + { + return isset($this->database_replication_enabled); + } + + public function clearDatabaseReplicationEnabled() + { + unset($this->database_replication_enabled); + } + + /** + * Returns the unboxed value from getDatabaseReplicationEnabled() + + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @return bool|null + */ + public function getDatabaseReplicationEnabledUnwrapped() + { + return $this->readWrapperValue("database_replication_enabled"); + } + + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDatabaseReplicationEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->database_replication_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @param bool|null $var + * @return $this + */ + public function setDatabaseReplicationEnabledUnwrapped($var) + { + $this->writeWrapperValue("database_replication_enabled", $var); + return $this;} + + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return $this->crash_safe_replication_enabled; + } + + public function hasCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return isset($this->crash_safe_replication_enabled); + } + + public function clearCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + unset($this->crash_safe_replication_enabled); + } + + /** + * Returns the unboxed value from getCrashSafeReplicationEnabled() + + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @return bool|null + */ + public function getCrashSafeReplicationEnabledUnwrapped() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("crash_safe_replication_enabled"); + } + + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setCrashSafeReplicationEnabled($var) + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->crash_safe_replication_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setCrashSafeReplicationEnabledUnwrapped($var) + { + $this->writeWrapperValue("crash_safe_replication_enabled", $var); + return $this;} + + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataDiskSizeGb() + { + return $this->data_disk_size_gb; + } + + public function hasDataDiskSizeGb() + { + return isset($this->data_disk_size_gb); + } + + public function clearDataDiskSizeGb() + { + unset($this->data_disk_size_gb); + } + + /** + * Returns the unboxed value from getDataDiskSizeGb() + + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @return int|string|null + */ + public function getDataDiskSizeGbUnwrapped() + { + return $this->readWrapperValue("data_disk_size_gb"); + } + + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataDiskSizeGb($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_disk_size_gb = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @param int|string|null $var + * @return $this + */ + public function setDataDiskSizeGbUnwrapped($var) + { + $this->writeWrapperValue("data_disk_size_gb", $var); + return $this;} + + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; + * @return \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig|null + */ + public function getActiveDirectoryConfig() + { + return $this->active_directory_config; + } + + public function hasActiveDirectoryConfig() + { + return isset($this->active_directory_config); + } + + public function clearActiveDirectoryConfig() + { + unset($this->active_directory_config); + } + + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlActiveDirectoryConfig active_directory_config = 22; + * @param \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig $var + * @return $this + */ + public function setActiveDirectoryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlActiveDirectoryConfig::class); + $this->active_directory_config = $var; + + return $this; + } + + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDenyMaintenancePeriods() + { + return $this->deny_maintenance_periods; + } + + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1.DenyMaintenancePeriod deny_maintenance_periods = 24; + * @param array<\Google\Cloud\Sql\V1\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDenyMaintenancePeriods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\DenyMaintenancePeriod::class); + $this->deny_maintenance_periods = $arr; + + return $this; + } + + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; + * @return \Google\Cloud\Sql\V1\InsightsConfig|null + */ + public function getInsightsConfig() + { + return $this->insights_config; + } + + public function hasInsightsConfig() + { + return isset($this->insights_config); + } + + public function clearInsightsConfig() + { + unset($this->insights_config); + } + + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1.InsightsConfig insights_config = 25; + * @param \Google\Cloud\Sql\V1\InsightsConfig $var + * @return $this + */ + public function setInsightsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InsightsConfig::class); + $this->insights_config = $var; + + return $this; + } + + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; + * @return \Google\Cloud\Sql\V1\PasswordValidationPolicy|null + */ + public function getPasswordValidationPolicy() + { + return $this->password_validation_policy; + } + + public function hasPasswordValidationPolicy() + { + return isset($this->password_validation_policy); + } + + public function clearPasswordValidationPolicy() + { + unset($this->password_validation_policy); + } + + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordValidationPolicy password_validation_policy = 27; + * @param \Google\Cloud\Sql\V1\PasswordValidationPolicy $var + * @return $this + */ + public function setPasswordValidationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PasswordValidationPolicy::class); + $this->password_validation_policy = $var; + + return $this; + } + + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; + * @return \Google\Cloud\Sql\V1\SqlServerAuditConfig|null + */ + public function getSqlServerAuditConfig() + { + return $this->sql_server_audit_config; + } + + public function hasSqlServerAuditConfig() + { + return isset($this->sql_server_audit_config); + } + + public function clearSqlServerAuditConfig() + { + unset($this->sql_server_audit_config); + } + + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlServerAuditConfig sql_server_audit_config = 29; + * @param \Google\Cloud\Sql\V1\SqlServerAuditConfig $var + * @return $this + */ + public function setSqlServerAuditConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerAuditConfig::class); + $this->sql_server_audit_config = $var; + + return $this; + } + + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\Edition::class); + $this->edition = $var; + + return $this; + } + + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; + * @return int + */ + public function getConnectorEnforcement() + { + return $this->connector_enforcement; + } + + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors). + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1.Settings.ConnectorEnforcement connector_enforcement = 32; + * @param int $var + * @return $this + */ + public function setConnectorEnforcement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\Settings\ConnectorEnforcement::class); + $this->connector_enforcement = $var; + + return $this; + } + + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDeletionProtectionEnabled() + { + return $this->deletion_protection_enabled; + } + + public function hasDeletionProtectionEnabled() + { + return isset($this->deletion_protection_enabled); + } + + public function clearDeletionProtectionEnabled() + { + unset($this->deletion_protection_enabled); + } + + /** + * Returns the unboxed value from getDeletionProtectionEnabled() + + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @return bool|null + */ + public function getDeletionProtectionEnabledUnwrapped() + { + return $this->readWrapperValue("deletion_protection_enabled"); + } + + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDeletionProtectionEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->deletion_protection_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @param bool|null $var + * @return $this + */ + public function setDeletionProtectionEnabledUnwrapped($var) + { + $this->writeWrapperValue("deletion_protection_enabled", $var); + return $this;} + + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; + * @return \Google\Cloud\Sql\V1\AdvancedMachineFeatures|null + */ + public function getAdvancedMachineFeatures() + { + return $this->advanced_machine_features; + } + + public function hasAdvancedMachineFeatures() + { + return isset($this->advanced_machine_features); + } + + public function clearAdvancedMachineFeatures() + { + unset($this->advanced_machine_features); + } + + /** + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1.AdvancedMachineFeatures advanced_machine_features = 35; + * @param \Google\Cloud\Sql\V1\AdvancedMachineFeatures $var + * @return $this + */ + public function setAdvancedMachineFeatures($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AdvancedMachineFeatures::class); + $this->advanced_machine_features = $var; + + return $this; + } + + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; + * @return \Google\Cloud\Sql\V1\DataCacheConfig|null + */ + public function getDataCacheConfig() + { + return $this->data_cache_config; + } + + public function hasDataCacheConfig() + { + return isset($this->data_cache_config); + } + + public function clearDataCacheConfig() + { + unset($this->data_cache_config); + } + + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; + * @param \Google\Cloud\Sql\V1\DataCacheConfig $var + * @return $this + */ + public function setDataCacheConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DataCacheConfig::class); + $this->data_cache_config = $var; + + return $this; + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnableGoogleMlIntegration() + { + return $this->enable_google_ml_integration; + } + + public function hasEnableGoogleMlIntegration() + { + return isset($this->enable_google_ml_integration); + } + + public function clearEnableGoogleMlIntegration() + { + unset($this->enable_google_ml_integration); + } + + /** + * Returns the unboxed value from getEnableGoogleMlIntegration() + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnableGoogleMlIntegrationUnwrapped() + { + return $this->readWrapperValue("enable_google_ml_integration"); + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnableGoogleMlIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_google_ml_integration = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnableGoogleMlIntegrationUnwrapped($var) + { + $this->writeWrapperValue("enable_google_ml_integration", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php new file mode 100644 index 000000000000..b5e20e282ce4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/ConnectorEnforcement.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1.Settings.ConnectorEnforcement + */ +class ConnectorEnforcement +{ + /** + * The requirement for Cloud SQL connectors is unknown. + * + * Generated from protobuf enum CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; + */ + const CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; + /** + * Do not require Cloud SQL connectors. + * + * Generated from protobuf enum NOT_REQUIRED = 1; + */ + const NOT_REQUIRED = 1; + /** + * Require all connections to use Cloud SQL connectors, including the + * Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. + * Note: This disables all existing authorized networks. + * + * Generated from protobuf enum REQUIRED = 2; + */ + const REQUIRED = 2; + + private static $valueToName = [ + self::CONNECTOR_ENFORCEMENT_UNSPECIFIED => 'CONNECTOR_ENFORCEMENT_UNSPECIFIED', + self::NOT_REQUIRED => 'NOT_REQUIRED', + self::REQUIRED => 'REQUIRED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConnectorEnforcement::class, \Google\Cloud\Sql\V1\Settings_ConnectorEnforcement::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php new file mode 100644 index 000000000000..5c3af9f7ac03 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/Edition.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.Settings.Edition + */ +class Edition +{ + /** + * The instance did not specify the edition. + * + * Generated from protobuf enum EDITION_UNSPECIFIED = 0; + */ + const EDITION_UNSPECIFIED = 0; + /** + * The instance is an enterprise edition. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + /** + * The instance is an Enterprise Plus edition. + * + * Generated from protobuf enum ENTERPRISE_PLUS = 3; + */ + const ENTERPRISE_PLUS = 3; + + private static $valueToName = [ + self::EDITION_UNSPECIFIED => 'EDITION_UNSPECIFIED', + self::ENTERPRISE => 'ENTERPRISE', + self::ENTERPRISE_PLUS => 'ENTERPRISE_PLUS', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Edition::class, \Google\Cloud\Sql\V1\Settings_Edition::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php new file mode 100644 index 000000000000..3e387860df63 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Settings/SqlActivationPolicy.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.Settings.SqlActivationPolicy + */ +class SqlActivationPolicy +{ + /** + * Unknown activation plan. + * + * Generated from protobuf enum SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + */ + const SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + /** + * The instance is always up and running. + * + * Generated from protobuf enum ALWAYS = 1; + */ + const ALWAYS = 1; + /** + * The instance never starts. + * + * Generated from protobuf enum NEVER = 2; + */ + const NEVER = 2; + /** + * The instance starts upon receiving requests. + * + * Generated from protobuf enum ON_DEMAND = 3 [deprecated = true]; + */ + const ON_DEMAND = 3; + + private static $valueToName = [ + self::SQL_ACTIVATION_POLICY_UNSPECIFIED => 'SQL_ACTIVATION_POLICY_UNSPECIFIED', + self::ALWAYS => 'ALWAYS', + self::NEVER => 'NEVER', + self::ON_DEMAND => 'ON_DEMAND', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlActivationPolicy::class, \Google\Cloud\Sql\V1\Settings_SqlActivationPolicy::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php new file mode 100644 index 000000000000..1ce7310f6dca --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlActiveDirectoryConfig.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlActiveDirectoryConfig + */ +class SqlActiveDirectoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + */ + protected $domain = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#activeDirectoryConfig. + * @type string $domain + * The name of the domain (e.g., mydomain.com). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php new file mode 100644 index 000000000000..31a166e7bd1e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlAvailabilityType.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlAvailabilityType + */ +class SqlAvailabilityType +{ + /** + * This is an unknown Availability type. + * + * Generated from protobuf enum SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + */ + const SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + /** + * Zonal available instance. + * + * Generated from protobuf enum ZONAL = 1; + */ + const ZONAL = 1; + /** + * Regional available instance. + * + * Generated from protobuf enum REGIONAL = 2; + */ + const REGIONAL = 2; + + private static $valueToName = [ + self::SQL_AVAILABILITY_TYPE_UNSPECIFIED => 'SQL_AVAILABILITY_TYPE_UNSPECIFIED', + self::ZONAL => 'ZONAL', + self::REGIONAL => 'REGIONAL', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php new file mode 100644 index 000000000000..83410c24b301 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackendType.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1.SqlBackendType + */ +class SqlBackendType +{ + /** + * This is an unknown backend type for instance. + * + * Generated from protobuf enum SQL_BACKEND_TYPE_UNSPECIFIED = 0; + */ + const SQL_BACKEND_TYPE_UNSPECIFIED = 0; + /** + * V1 speckle instance. + * + * Generated from protobuf enum FIRST_GEN = 1 [deprecated = true]; + */ + const FIRST_GEN = 1; + /** + * V2 speckle instance. + * + * Generated from protobuf enum SECOND_GEN = 2; + */ + const SECOND_GEN = 2; + /** + * On premises instance. + * + * Generated from protobuf enum EXTERNAL = 3; + */ + const EXTERNAL = 3; + + private static $valueToName = [ + self::SQL_BACKEND_TYPE_UNSPECIFIED => 'SQL_BACKEND_TYPE_UNSPECIFIED', + self::FIRST_GEN => 'FIRST_GEN', + self::SECOND_GEN => 'SECOND_GEN', + self::EXTERNAL => 'EXTERNAL', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php new file mode 100644 index 000000000000..c4c169c2f790 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupKind.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlBackupKind + */ +class SqlBackupKind +{ + /** + * This is an unknown BackupKind. + * + * Generated from protobuf enum SQL_BACKUP_KIND_UNSPECIFIED = 0; + */ + const SQL_BACKUP_KIND_UNSPECIFIED = 0; + /** + * The snapshot based backups + * + * Generated from protobuf enum SNAPSHOT = 1; + */ + const SNAPSHOT = 1; + /** + * Physical backups + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::SQL_BACKUP_KIND_UNSPECIFIED => 'SQL_BACKUP_KIND_UNSPECIFIED', + self::SNAPSHOT => 'SNAPSHOT', + self::PHYSICAL => 'PHYSICAL', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php new file mode 100644 index 000000000000..e7d2d6b71be2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunStatus.php @@ -0,0 +1,113 @@ +google.cloud.sql.v1.SqlBackupRunStatus + */ +class SqlBackupRunStatus +{ + /** + * The status of the run is unknown. + * + * Generated from protobuf enum SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; + */ + const SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; + /** + * The backup operation was enqueued. + * + * Generated from protobuf enum ENQUEUED = 1; + */ + const ENQUEUED = 1; + /** + * The backup is overdue across a given backup window. Indicates a + * problem. Example: Long-running operation in progress during + * the whole window. + * + * Generated from protobuf enum OVERDUE = 2; + */ + const OVERDUE = 2; + /** + * The backup is in progress. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The backup failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The backup was successful. + * + * Generated from protobuf enum SUCCESSFUL = 5; + */ + const SUCCESSFUL = 5; + /** + * The backup was skipped (without problems) for a given backup + * window. Example: Instance was idle. + * + * Generated from protobuf enum SKIPPED = 6; + */ + const SKIPPED = 6; + /** + * The backup is about to be deleted. + * + * Generated from protobuf enum DELETION_PENDING = 7; + */ + const DELETION_PENDING = 7; + /** + * The backup deletion failed. + * + * Generated from protobuf enum DELETION_FAILED = 8; + */ + const DELETION_FAILED = 8; + /** + * The backup has been deleted. + * + * Generated from protobuf enum DELETED = 9; + */ + const DELETED = 9; + + private static $valueToName = [ + self::SQL_BACKUP_RUN_STATUS_UNSPECIFIED => 'SQL_BACKUP_RUN_STATUS_UNSPECIFIED', + self::ENQUEUED => 'ENQUEUED', + self::OVERDUE => 'OVERDUE', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCESSFUL => 'SUCCESSFUL', + self::SKIPPED => 'SKIPPED', + self::DELETION_PENDING => 'DELETION_PENDING', + self::DELETION_FAILED => 'DELETION_FAILED', + self::DELETED => 'DELETED', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php new file mode 100644 index 000000000000..af9710f16b4b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunType.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlBackupRunType + */ +class SqlBackupRunType +{ + /** + * This is an unknown BackupRun type. + * + * Generated from protobuf enum SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; + */ + const SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; + /** + * The backup schedule automatically triggers a backup. + * + * Generated from protobuf enum AUTOMATED = 1; + */ + const AUTOMATED = 1; + /** + * The user manually triggers a backup. + * + * Generated from protobuf enum ON_DEMAND = 2; + */ + const ON_DEMAND = 2; + + private static $valueToName = [ + self::SQL_BACKUP_RUN_TYPE_UNSPECIFIED => 'SQL_BACKUP_RUN_TYPE_UNSPECIFIED', + self::AUTOMATED => 'AUTOMATED', + self::ON_DEMAND => 'ON_DEMAND', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php new file mode 100644 index 000000000000..3ac692b31491 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsDeleteRequest.php @@ -0,0 +1,143 @@ +google.cloud.sql.v1.SqlBackupRunsDeleteRequest + */ +class SqlBackupRunsDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php new file mode 100644 index 000000000000..eb84e91a6924 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsGetRequest.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlBackupRunsGetRequest + */ +class SqlBackupRunsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * The ID of this backup run. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php new file mode 100644 index 000000000000..a65e8e21c3d4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsInsertRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlBackupRunsInsertRequest + */ +class SqlBackupRunsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\BackupRun $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; + * @return \Google\Cloud\Sql\V1\BackupRun|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.BackupRun body = 100; + * @param \Google\Cloud\Sql\V1\BackupRun $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\BackupRun::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php new file mode 100644 index 000000000000..b674e837dd0c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlBackupRunsListRequest.php @@ -0,0 +1,177 @@ +google.cloud.sql.v1.SqlBackupRunsListRequest + */ +class SqlBackupRunsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * @type int $max_results + * Maximum number of backup runs per response. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlBackupRuns::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkInt32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php new file mode 100644 index 000000000000..e1ac52150431 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDataDiskType.php @@ -0,0 +1,69 @@ +google.cloud.sql.v1.SqlDataDiskType + */ +class SqlDataDiskType +{ + /** + * This is an unknown data disk type. + * + * Generated from protobuf enum SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + */ + const SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + /** + * An SSD data disk. + * + * Generated from protobuf enum PD_SSD = 1; + */ + const PD_SSD = 1; + /** + * An HDD data disk. + * + * Generated from protobuf enum PD_HDD = 2; + */ + const PD_HDD = 2; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf enum OBSOLETE_LOCAL_SSD = 3 [deprecated = true]; + */ + const OBSOLETE_LOCAL_SSD = 3; + + private static $valueToName = [ + self::SQL_DATA_DISK_TYPE_UNSPECIFIED => 'SQL_DATA_DISK_TYPE_UNSPECIFIED', + self::PD_SSD => 'PD_SSD', + self::PD_HDD => 'PD_HDD', + self::OBSOLETE_LOCAL_SSD => 'OBSOLETE_LOCAL_SSD', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php new file mode 100644 index 000000000000..98b70d4298d9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabaseVersion.php @@ -0,0 +1,327 @@ +google.cloud.sql.v1.SqlDatabaseVersion + */ +class SqlDatabaseVersion +{ + /** + * This is an unknown database version. + * + * Generated from protobuf enum SQL_DATABASE_VERSION_UNSPECIFIED = 0; + */ + const SQL_DATABASE_VERSION_UNSPECIFIED = 0; + /** + * The database version is MySQL 5.1. + * + * Generated from protobuf enum MYSQL_5_1 = 2 [deprecated = true]; + */ + const MYSQL_5_1 = 2; + /** + * The database version is MySQL 5.5. + * + * Generated from protobuf enum MYSQL_5_5 = 3 [deprecated = true]; + */ + const MYSQL_5_5 = 3; + /** + * The database version is MySQL 5.6. + * + * Generated from protobuf enum MYSQL_5_6 = 5; + */ + const MYSQL_5_6 = 5; + /** + * The database version is MySQL 5.7. + * + * Generated from protobuf enum MYSQL_5_7 = 6; + */ + const MYSQL_5_7 = 6; + /** + * The database version is SQL Server 2017 Standard. + * + * Generated from protobuf enum SQLSERVER_2017_STANDARD = 11; + */ + const SQLSERVER_2017_STANDARD = 11; + /** + * The database version is SQL Server 2017 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2017_ENTERPRISE = 14; + */ + const SQLSERVER_2017_ENTERPRISE = 14; + /** + * The database version is SQL Server 2017 Express. + * + * Generated from protobuf enum SQLSERVER_2017_EXPRESS = 15; + */ + const SQLSERVER_2017_EXPRESS = 15; + /** + * The database version is SQL Server 2017 Web. + * + * Generated from protobuf enum SQLSERVER_2017_WEB = 16; + */ + const SQLSERVER_2017_WEB = 16; + /** + * The database version is PostgreSQL 9.6. + * + * Generated from protobuf enum POSTGRES_9_6 = 9; + */ + const POSTGRES_9_6 = 9; + /** + * The database version is PostgreSQL 10. + * + * Generated from protobuf enum POSTGRES_10 = 18; + */ + const POSTGRES_10 = 18; + /** + * The database version is PostgreSQL 11. + * + * Generated from protobuf enum POSTGRES_11 = 10; + */ + const POSTGRES_11 = 10; + /** + * The database version is PostgreSQL 12. + * + * Generated from protobuf enum POSTGRES_12 = 19; + */ + const POSTGRES_12 = 19; + /** + * The database version is PostgreSQL 13. + * + * Generated from protobuf enum POSTGRES_13 = 23; + */ + const POSTGRES_13 = 23; + /** + * The database version is PostgreSQL 14. + * + * Generated from protobuf enum POSTGRES_14 = 110; + */ + const POSTGRES_14 = 110; + /** + * The database version is PostgreSQL 15. + * + * Generated from protobuf enum POSTGRES_15 = 172; + */ + const POSTGRES_15 = 172; + /** + * The database version is MySQL 8. + * + * Generated from protobuf enum MYSQL_8_0 = 20; + */ + const MYSQL_8_0 = 20; + /** + * The database major version is MySQL 8.0 and the minor version is 18. + * + * Generated from protobuf enum MYSQL_8_0_18 = 41; + */ + const MYSQL_8_0_18 = 41; + /** + * The database major version is MySQL 8.0 and the minor version is 26. + * + * Generated from protobuf enum MYSQL_8_0_26 = 85; + */ + const MYSQL_8_0_26 = 85; + /** + * The database major version is MySQL 8.0 and the minor version is 27. + * + * Generated from protobuf enum MYSQL_8_0_27 = 111; + */ + const MYSQL_8_0_27 = 111; + /** + * The database major version is MySQL 8.0 and the minor version is 28. + * + * Generated from protobuf enum MYSQL_8_0_28 = 132; + */ + const MYSQL_8_0_28 = 132; + /** + * The database major version is MySQL 8.0 and the minor version is 29. + * + * Generated from protobuf enum MYSQL_8_0_29 = 148 [deprecated = true]; + */ + const MYSQL_8_0_29 = 148; + /** + * The database major version is MySQL 8.0 and the minor version is 30. + * + * Generated from protobuf enum MYSQL_8_0_30 = 174; + */ + const MYSQL_8_0_30 = 174; + /** + * The database major version is MySQL 8.0 and the minor version is 31. + * + * Generated from protobuf enum MYSQL_8_0_31 = 197; + */ + const MYSQL_8_0_31 = 197; + /** + * The database major version is MySQL 8.0 and the minor version is 32. + * + * Generated from protobuf enum MYSQL_8_0_32 = 213; + */ + const MYSQL_8_0_32 = 213; + /** + * The database major version is MySQL 8.0 and the minor version is 33. + * + * Generated from protobuf enum MYSQL_8_0_33 = 238; + */ + const MYSQL_8_0_33 = 238; + /** + * The database major version is MySQL 8.0 and the minor version is 34. + * + * Generated from protobuf enum MYSQL_8_0_34 = 239; + */ + const MYSQL_8_0_34 = 239; + /** + * The database major version is MySQL 8.0 and the minor version is 35. + * + * Generated from protobuf enum MYSQL_8_0_35 = 240; + */ + const MYSQL_8_0_35 = 240; + /** + * The database major version is MySQL 8.0 and the minor version is 36. + * + * Generated from protobuf enum MYSQL_8_0_36 = 241; + */ + const MYSQL_8_0_36 = 241; + /** + * The database major version is MySQL 8.0 and the minor version is 37. + * + * Generated from protobuf enum MYSQL_8_0_37 = 355; + */ + const MYSQL_8_0_37 = 355; + /** + * The database major version is MySQL 8.0 and the minor version is 38. + * + * Generated from protobuf enum MYSQL_8_0_38 = 356; + */ + const MYSQL_8_0_38 = 356; + /** + * The database major version is MySQL 8.0 and the minor version is 39. + * + * Generated from protobuf enum MYSQL_8_0_39 = 357; + */ + const MYSQL_8_0_39 = 357; + /** + * The database major version is MySQL 8.0 and the minor version is 40. + * + * Generated from protobuf enum MYSQL_8_0_40 = 358; + */ + const MYSQL_8_0_40 = 358; + /** + * The database version is SQL Server 2019 Standard. + * + * Generated from protobuf enum SQLSERVER_2019_STANDARD = 26; + */ + const SQLSERVER_2019_STANDARD = 26; + /** + * The database version is SQL Server 2019 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2019_ENTERPRISE = 27; + */ + const SQLSERVER_2019_ENTERPRISE = 27; + /** + * The database version is SQL Server 2019 Express. + * + * Generated from protobuf enum SQLSERVER_2019_EXPRESS = 28; + */ + const SQLSERVER_2019_EXPRESS = 28; + /** + * The database version is SQL Server 2019 Web. + * + * Generated from protobuf enum SQLSERVER_2019_WEB = 29; + */ + const SQLSERVER_2019_WEB = 29; + /** + * The database version is SQL Server 2022 Standard. + * + * Generated from protobuf enum SQLSERVER_2022_STANDARD = 199; + */ + const SQLSERVER_2022_STANDARD = 199; + /** + * The database version is SQL Server 2022 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2022_ENTERPRISE = 200; + */ + const SQLSERVER_2022_ENTERPRISE = 200; + /** + * The database version is SQL Server 2022 Express. + * + * Generated from protobuf enum SQLSERVER_2022_EXPRESS = 201; + */ + const SQLSERVER_2022_EXPRESS = 201; + /** + * The database version is SQL Server 2022 Web. + * + * Generated from protobuf enum SQLSERVER_2022_WEB = 202; + */ + const SQLSERVER_2022_WEB = 202; + + private static $valueToName = [ + self::SQL_DATABASE_VERSION_UNSPECIFIED => 'SQL_DATABASE_VERSION_UNSPECIFIED', + self::MYSQL_5_1 => 'MYSQL_5_1', + self::MYSQL_5_5 => 'MYSQL_5_5', + self::MYSQL_5_6 => 'MYSQL_5_6', + self::MYSQL_5_7 => 'MYSQL_5_7', + self::SQLSERVER_2017_STANDARD => 'SQLSERVER_2017_STANDARD', + self::SQLSERVER_2017_ENTERPRISE => 'SQLSERVER_2017_ENTERPRISE', + self::SQLSERVER_2017_EXPRESS => 'SQLSERVER_2017_EXPRESS', + self::SQLSERVER_2017_WEB => 'SQLSERVER_2017_WEB', + self::POSTGRES_9_6 => 'POSTGRES_9_6', + self::POSTGRES_10 => 'POSTGRES_10', + self::POSTGRES_11 => 'POSTGRES_11', + self::POSTGRES_12 => 'POSTGRES_12', + self::POSTGRES_13 => 'POSTGRES_13', + self::POSTGRES_14 => 'POSTGRES_14', + self::POSTGRES_15 => 'POSTGRES_15', + self::MYSQL_8_0 => 'MYSQL_8_0', + self::MYSQL_8_0_18 => 'MYSQL_8_0_18', + self::MYSQL_8_0_26 => 'MYSQL_8_0_26', + self::MYSQL_8_0_27 => 'MYSQL_8_0_27', + self::MYSQL_8_0_28 => 'MYSQL_8_0_28', + self::MYSQL_8_0_29 => 'MYSQL_8_0_29', + self::MYSQL_8_0_30 => 'MYSQL_8_0_30', + self::MYSQL_8_0_31 => 'MYSQL_8_0_31', + self::MYSQL_8_0_32 => 'MYSQL_8_0_32', + self::MYSQL_8_0_33 => 'MYSQL_8_0_33', + self::MYSQL_8_0_34 => 'MYSQL_8_0_34', + self::MYSQL_8_0_35 => 'MYSQL_8_0_35', + self::MYSQL_8_0_36 => 'MYSQL_8_0_36', + self::MYSQL_8_0_37 => 'MYSQL_8_0_37', + self::MYSQL_8_0_38 => 'MYSQL_8_0_38', + self::MYSQL_8_0_39 => 'MYSQL_8_0_39', + self::MYSQL_8_0_40 => 'MYSQL_8_0_40', + self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD', + self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE', + self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS', + self::SQLSERVER_2019_WEB => 'SQLSERVER_2019_WEB', + self::SQLSERVER_2022_STANDARD => 'SQLSERVER_2022_STANDARD', + self::SQLSERVER_2022_ENTERPRISE => 'SQLSERVER_2022_ENTERPRISE', + self::SQLSERVER_2022_EXPRESS => 'SQLSERVER_2022_EXPRESS', + self::SQLSERVER_2022_WEB => 'SQLSERVER_2022_WEB', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php new file mode 100644 index 000000000000..503872be9d28 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesDeleteRequest.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlDatabasesDeleteRequest + */ +class SqlDatabasesDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database to be deleted in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php new file mode 100644 index 000000000000..b208cae08bf2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesGetRequest.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlDatabasesGetRequest + */ +class SqlDatabasesGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php new file mode 100644 index 000000000000..c2537d9d5edc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesInsertRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlDatabasesInsertRequest + */ +class SqlDatabasesInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\Database $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @return \Google\Cloud\Sql\V1\Database|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @param \Google\Cloud\Sql\V1\Database $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Database::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php new file mode 100644 index 000000000000..e9163885e1c2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesListRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlDatabasesListRequest + */ +class SqlDatabasesListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php new file mode 100644 index 000000000000..c8f2042a8b84 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlDatabasesUpdateRequest.php @@ -0,0 +1,172 @@ +google.cloud.sql.v1.SqlDatabasesUpdateRequest + */ +class SqlDatabasesUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database to be updated in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\Database $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlDatabases::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @return \Google\Cloud\Sql\V1\Database|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.Database body = 100; + * @param \Google\Cloud\Sql\V1\Database $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Database::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php new file mode 100644 index 000000000000..2bfbb89ddbc3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1.SqlExternalSyncSettingError + */ +class SqlExternalSyncSettingError extends \Google\Protobuf\Internal\Message +{ + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + */ + protected $type = 0; + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + */ + protected $detail = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * @type int $type + * Identifies the specific error that occurred. + * @type string $detail + * Additional information about the error encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError\SqlExternalSyncSettingErrorType::class); + $this->type = $var; + + return $this; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + * @return string + */ + public function getDetail() + { + return $this->detail; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + * @param string $var + * @return $this + */ + public function setDetail($var) + { + GPBUtil::checkString($var, True); + $this->detail = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php new file mode 100644 index 000000000000..fee8f53d3200 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php @@ -0,0 +1,360 @@ +google.cloud.sql.v1.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType + */ +class SqlExternalSyncSettingErrorType +{ + /** + * Generated from protobuf enum SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; + */ + const SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CONNECTION_FAILURE = 1; + */ + const CONNECTION_FAILURE = 1; + /** + * Generated from protobuf enum BINLOG_NOT_ENABLED = 2; + */ + const BINLOG_NOT_ENABLED = 2; + /** + * Generated from protobuf enum INCOMPATIBLE_DATABASE_VERSION = 3; + */ + const INCOMPATIBLE_DATABASE_VERSION = 3; + /** + * Generated from protobuf enum REPLICA_ALREADY_SETUP = 4; + */ + const REPLICA_ALREADY_SETUP = 4; + /** + * The replication user is missing privileges that are required. + * + * Generated from protobuf enum INSUFFICIENT_PRIVILEGE = 5; + */ + const INSUFFICIENT_PRIVILEGE = 5; + /** + * Unsupported migration type. + * + * Generated from protobuf enum UNSUPPORTED_MIGRATION_TYPE = 6; + */ + const UNSUPPORTED_MIGRATION_TYPE = 6; + /** + * No pglogical extension installed on databases, applicable for postgres. + * + * Generated from protobuf enum NO_PGLOGICAL_INSTALLED = 7; + */ + const NO_PGLOGICAL_INSTALLED = 7; + /** + * pglogical node already exists on databases, applicable for postgres. + * + * Generated from protobuf enum PGLOGICAL_NODE_ALREADY_EXISTS = 8; + */ + const PGLOGICAL_NODE_ALREADY_EXISTS = 8; + /** + * The value of parameter wal_level is not set to logical. + * + * Generated from protobuf enum INVALID_WAL_LEVEL = 9; + */ + const INVALID_WAL_LEVEL = 9; + /** + * The value of parameter shared_preload_libraries does not include + * pglogical. + * + * Generated from protobuf enum INVALID_SHARED_PRELOAD_LIBRARY = 10; + */ + const INVALID_SHARED_PRELOAD_LIBRARY = 10; + /** + * The value of parameter max_replication_slots is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + */ + const INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + /** + * The value of parameter max_wal_senders is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_WAL_SENDERS = 12; + */ + const INSUFFICIENT_MAX_WAL_SENDERS = 12; + /** + * The value of parameter max_worker_processes is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + */ + const INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + /** + * Extensions installed are either not supported or having unsupported + * versions. + * + * Generated from protobuf enum UNSUPPORTED_EXTENSIONS = 14; + */ + const UNSUPPORTED_EXTENSIONS = 14; + /** + * The value of parameter rds.logical_replication is not set to 1. + * + * Generated from protobuf enum INVALID_RDS_LOGICAL_REPLICATION = 15; + */ + const INVALID_RDS_LOGICAL_REPLICATION = 15; + /** + * The primary instance logging setup doesn't allow EM sync. + * + * Generated from protobuf enum INVALID_LOGGING_SETUP = 16; + */ + const INVALID_LOGGING_SETUP = 16; + /** + * The primary instance database parameter setup doesn't allow EM sync. + * + * Generated from protobuf enum INVALID_DB_PARAM = 17; + */ + const INVALID_DB_PARAM = 17; + /** + * The gtid_mode is not supported, applicable for MySQL. + * + * Generated from protobuf enum UNSUPPORTED_GTID_MODE = 18; + */ + const UNSUPPORTED_GTID_MODE = 18; + /** + * SQL Server Agent is not running. + * + * Generated from protobuf enum SQLSERVER_AGENT_NOT_RUNNING = 19; + */ + const SQLSERVER_AGENT_NOT_RUNNING = 19; + /** + * The table definition is not support due to missing primary key or replica + * identity, applicable for postgres. + * + * Generated from protobuf enum UNSUPPORTED_TABLE_DEFINITION = 20; + */ + const UNSUPPORTED_TABLE_DEFINITION = 20; + /** + * The customer has a definer that will break EM setup. + * + * Generated from protobuf enum UNSUPPORTED_DEFINER = 21; + */ + const UNSUPPORTED_DEFINER = 21; + /** + * SQL Server @@SERVERNAME does not match actual host name. + * + * Generated from protobuf enum SQLSERVER_SERVERNAME_MISMATCH = 22; + */ + const SQLSERVER_SERVERNAME_MISMATCH = 22; + /** + * The primary instance has been setup and will fail the setup. + * + * Generated from protobuf enum PRIMARY_ALREADY_SETUP = 23; + */ + const PRIMARY_ALREADY_SETUP = 23; + /** + * The primary instance has unsupported binary log format. + * + * Generated from protobuf enum UNSUPPORTED_BINLOG_FORMAT = 24; + */ + const UNSUPPORTED_BINLOG_FORMAT = 24; + /** + * The primary instance's binary log retention setting. + * + * Generated from protobuf enum BINLOG_RETENTION_SETTING = 25; + */ + const BINLOG_RETENTION_SETTING = 25; + /** + * The primary instance has tables with unsupported storage engine. + * + * Generated from protobuf enum UNSUPPORTED_STORAGE_ENGINE = 26; + */ + const UNSUPPORTED_STORAGE_ENGINE = 26; + /** + * Source has tables with limited support + * eg: PostgreSQL tables without primary keys. + * + * Generated from protobuf enum LIMITED_SUPPORT_TABLES = 27; + */ + const LIMITED_SUPPORT_TABLES = 27; + /** + * The replica instance contains existing data. + * + * Generated from protobuf enum EXISTING_DATA_IN_REPLICA = 28; + */ + const EXISTING_DATA_IN_REPLICA = 28; + /** + * The replication user is missing privileges that are optional. + * + * Generated from protobuf enum MISSING_OPTIONAL_PRIVILEGES = 29; + */ + const MISSING_OPTIONAL_PRIVILEGES = 29; + /** + * Additional BACKUP_ADMIN privilege is granted to the replication user + * which may lock source MySQL 8 instance for DDLs during initial sync. + * + * Generated from protobuf enum RISKY_BACKUP_ADMIN_PRIVILEGE = 30; + */ + const RISKY_BACKUP_ADMIN_PRIVILEGE = 30; + /** + * The Cloud Storage bucket is missing necessary permissions. + * + * Generated from protobuf enum INSUFFICIENT_GCS_PERMISSIONS = 31; + */ + const INSUFFICIENT_GCS_PERMISSIONS = 31; + /** + * The Cloud Storage bucket has an error in the file or contains invalid + * file information. + * + * Generated from protobuf enum INVALID_FILE_INFO = 32; + */ + const INVALID_FILE_INFO = 32; + /** + * The source instance has unsupported database settings for migration. + * + * Generated from protobuf enum UNSUPPORTED_DATABASE_SETTINGS = 33; + */ + const UNSUPPORTED_DATABASE_SETTINGS = 33; + /** + * The replication user is missing parallel import specific privileges. + * (e.g. LOCK TABLES) for MySQL. + * + * Generated from protobuf enum MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; + */ + const MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; + /** + * The global variable local_infile is off on external server replica. + * + * Generated from protobuf enum LOCAL_INFILE_OFF = 35; + */ + const LOCAL_INFILE_OFF = 35; + /** + * This code instructs customers to turn on point-in-time recovery manually + * for the instance after promoting the Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf enum TURN_ON_PITR_AFTER_PROMOTE = 36; + */ + const TURN_ON_PITR_AFTER_PROMOTE = 36; + /** + * The minor version of replica database is incompatible with the source. + * + * Generated from protobuf enum INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; + */ + const INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; + /** + * This warning message indicates that Cloud SQL uses the maximum number of + * subscriptions to migrate data from the source to the destination. + * + * Generated from protobuf enum SOURCE_MAX_SUBSCRIPTIONS = 38; + */ + const SOURCE_MAX_SUBSCRIPTIONS = 38; + /** + * Unable to verify definers on the source for MySQL. + * + * Generated from protobuf enum UNABLE_TO_VERIFY_DEFINERS = 39; + */ + const UNABLE_TO_VERIFY_DEFINERS = 39; + /** + * If a time out occurs while the subscription counts are calculated, then + * this value is set to 1. Otherwise, this value is set to 2. + * + * Generated from protobuf enum SUBSCRIPTION_CALCULATION_STATUS = 40; + */ + const SUBSCRIPTION_CALCULATION_STATUS = 40; + /** + * Count of subscriptions needed to sync source data for PostgreSQL + * database. + * + * Generated from protobuf enum PG_SUBSCRIPTION_COUNT = 41; + */ + const PG_SUBSCRIPTION_COUNT = 41; + /** + * Final parallel level that is used to do migration. + * + * Generated from protobuf enum PG_SYNC_PARALLEL_LEVEL = 42; + */ + const PG_SYNC_PARALLEL_LEVEL = 42; + /** + * The disk size of the replica instance is smaller than the data size of + * the source instance. + * + * Generated from protobuf enum INSUFFICIENT_DISK_SIZE = 43; + */ + const INSUFFICIENT_DISK_SIZE = 43; + /** + * The data size of the source instance is greater than 1 TB, the number of + * cores of the replica instance is less than 8, and the memory of the + * replica is less than 32 GB. + * + * Generated from protobuf enum INSUFFICIENT_MACHINE_TIER = 44; + */ + const INSUFFICIENT_MACHINE_TIER = 44; + + private static $valueToName = [ + self::SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED => 'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED', + self::CONNECTION_FAILURE => 'CONNECTION_FAILURE', + self::BINLOG_NOT_ENABLED => 'BINLOG_NOT_ENABLED', + self::INCOMPATIBLE_DATABASE_VERSION => 'INCOMPATIBLE_DATABASE_VERSION', + self::REPLICA_ALREADY_SETUP => 'REPLICA_ALREADY_SETUP', + self::INSUFFICIENT_PRIVILEGE => 'INSUFFICIENT_PRIVILEGE', + self::UNSUPPORTED_MIGRATION_TYPE => 'UNSUPPORTED_MIGRATION_TYPE', + self::NO_PGLOGICAL_INSTALLED => 'NO_PGLOGICAL_INSTALLED', + self::PGLOGICAL_NODE_ALREADY_EXISTS => 'PGLOGICAL_NODE_ALREADY_EXISTS', + self::INVALID_WAL_LEVEL => 'INVALID_WAL_LEVEL', + self::INVALID_SHARED_PRELOAD_LIBRARY => 'INVALID_SHARED_PRELOAD_LIBRARY', + self::INSUFFICIENT_MAX_REPLICATION_SLOTS => 'INSUFFICIENT_MAX_REPLICATION_SLOTS', + self::INSUFFICIENT_MAX_WAL_SENDERS => 'INSUFFICIENT_MAX_WAL_SENDERS', + self::INSUFFICIENT_MAX_WORKER_PROCESSES => 'INSUFFICIENT_MAX_WORKER_PROCESSES', + self::UNSUPPORTED_EXTENSIONS => 'UNSUPPORTED_EXTENSIONS', + self::INVALID_RDS_LOGICAL_REPLICATION => 'INVALID_RDS_LOGICAL_REPLICATION', + self::INVALID_LOGGING_SETUP => 'INVALID_LOGGING_SETUP', + self::INVALID_DB_PARAM => 'INVALID_DB_PARAM', + self::UNSUPPORTED_GTID_MODE => 'UNSUPPORTED_GTID_MODE', + self::SQLSERVER_AGENT_NOT_RUNNING => 'SQLSERVER_AGENT_NOT_RUNNING', + self::UNSUPPORTED_TABLE_DEFINITION => 'UNSUPPORTED_TABLE_DEFINITION', + self::UNSUPPORTED_DEFINER => 'UNSUPPORTED_DEFINER', + self::SQLSERVER_SERVERNAME_MISMATCH => 'SQLSERVER_SERVERNAME_MISMATCH', + self::PRIMARY_ALREADY_SETUP => 'PRIMARY_ALREADY_SETUP', + self::UNSUPPORTED_BINLOG_FORMAT => 'UNSUPPORTED_BINLOG_FORMAT', + self::BINLOG_RETENTION_SETTING => 'BINLOG_RETENTION_SETTING', + self::UNSUPPORTED_STORAGE_ENGINE => 'UNSUPPORTED_STORAGE_ENGINE', + self::LIMITED_SUPPORT_TABLES => 'LIMITED_SUPPORT_TABLES', + self::EXISTING_DATA_IN_REPLICA => 'EXISTING_DATA_IN_REPLICA', + self::MISSING_OPTIONAL_PRIVILEGES => 'MISSING_OPTIONAL_PRIVILEGES', + self::RISKY_BACKUP_ADMIN_PRIVILEGE => 'RISKY_BACKUP_ADMIN_PRIVILEGE', + self::INSUFFICIENT_GCS_PERMISSIONS => 'INSUFFICIENT_GCS_PERMISSIONS', + self::INVALID_FILE_INFO => 'INVALID_FILE_INFO', + self::UNSUPPORTED_DATABASE_SETTINGS => 'UNSUPPORTED_DATABASE_SETTINGS', + self::MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE => 'MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE', + self::LOCAL_INFILE_OFF => 'LOCAL_INFILE_OFF', + self::TURN_ON_PITR_AFTER_PROMOTE => 'TURN_ON_PITR_AFTER_PROMOTE', + self::INCOMPATIBLE_DATABASE_MINOR_VERSION => 'INCOMPATIBLE_DATABASE_MINOR_VERSION', + self::SOURCE_MAX_SUBSCRIPTIONS => 'SOURCE_MAX_SUBSCRIPTIONS', + self::UNABLE_TO_VERIFY_DEFINERS => 'UNABLE_TO_VERIFY_DEFINERS', + self::SUBSCRIPTION_CALCULATION_STATUS => 'SUBSCRIPTION_CALCULATION_STATUS', + self::PG_SUBSCRIPTION_COUNT => 'PG_SUBSCRIPTION_COUNT', + self::PG_SYNC_PARALLEL_LEVEL => 'PG_SYNC_PARALLEL_LEVEL', + self::INSUFFICIENT_DISK_SIZE => 'INSUFFICIENT_DISK_SIZE', + self::INSUFFICIENT_MACHINE_TIER => 'INSUFFICIENT_MACHINE_TIER', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlExternalSyncSettingErrorType::class, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError_SqlExternalSyncSettingErrorType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php new file mode 100644 index 000000000000..724da57f17ba --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFileType.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.SqlFileType + */ +class SqlFileType +{ + /** + * Unknown file type. + * + * Generated from protobuf enum SQL_FILE_TYPE_UNSPECIFIED = 0; + */ + const SQL_FILE_TYPE_UNSPECIFIED = 0; + /** + * File containing SQL statements. + * + * Generated from protobuf enum SQL = 1; + */ + const SQL = 1; + /** + * File in CSV format. + * + * Generated from protobuf enum CSV = 2; + */ + const CSV = 2; + /** + * Generated from protobuf enum BAK = 4; + */ + const BAK = 4; + + private static $valueToName = [ + self::SQL_FILE_TYPE_UNSPECIFIED => 'SQL_FILE_TYPE_UNSPECIFIED', + self::SQL => 'SQL', + self::CSV => 'CSV', + self::BAK => 'BAK', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php new file mode 100644 index 000000000000..7c6f2f5685a9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagType.php @@ -0,0 +1,95 @@ +google.cloud.sql.v1.SqlFlagType + */ +class SqlFlagType +{ + /** + * This is an unknown flag type. + * + * Generated from protobuf enum SQL_FLAG_TYPE_UNSPECIFIED = 0; + */ + const SQL_FLAG_TYPE_UNSPECIFIED = 0; + /** + * Boolean type flag. + * + * Generated from protobuf enum BOOLEAN = 1; + */ + const BOOLEAN = 1; + /** + * String type flag. + * + * Generated from protobuf enum STRING = 2; + */ + const STRING = 2; + /** + * Integer type flag. + * + * Generated from protobuf enum INTEGER = 3; + */ + const INTEGER = 3; + /** + * Flag type used for a server startup option. + * + * Generated from protobuf enum NONE = 4; + */ + const NONE = 4; + /** + * Type introduced specially for MySQL TimeZone offset. Accept a string value + * with the format [-12:59, 13:00]. + * + * Generated from protobuf enum MYSQL_TIMEZONE_OFFSET = 5; + */ + const MYSQL_TIMEZONE_OFFSET = 5; + /** + * Float type flag. + * + * Generated from protobuf enum FLOAT = 6; + */ + const FLOAT = 6; + /** + * Comma-separated list of the strings in a SqlFlagType enum. + * + * Generated from protobuf enum REPEATED_STRING = 7; + */ + const REPEATED_STRING = 7; + + private static $valueToName = [ + self::SQL_FLAG_TYPE_UNSPECIFIED => 'SQL_FLAG_TYPE_UNSPECIFIED', + self::BOOLEAN => 'BOOLEAN', + self::STRING => 'STRING', + self::INTEGER => 'INTEGER', + self::NONE => 'NONE', + self::MYSQL_TIMEZONE_OFFSET => 'MYSQL_TIMEZONE_OFFSET', + self::FLOAT => 'FLOAT', + self::REPEATED_STRING => 'REPEATED_STRING', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php new file mode 100644 index 000000000000..329b62db5183 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlFlagsListRequest.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.SqlFlagsListRequest + */ +class SqlFlagsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + */ + protected $database_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database_version + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlFlags::initOnce(); + parent::__construct($data); + } + + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + * @return string + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + * @param string $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php new file mode 100644 index 000000000000..983f95a0d726 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstanceType.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1.SqlInstanceType + */ +class SqlInstanceType +{ + /** + * This is an unknown Cloud SQL instance type. + * + * Generated from protobuf enum SQL_INSTANCE_TYPE_UNSPECIFIED = 0; + */ + const SQL_INSTANCE_TYPE_UNSPECIFIED = 0; + /** + * A regular Cloud SQL instance that is not replicating from a primary + * instance. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 1; + */ + const CLOUD_SQL_INSTANCE = 1; + /** + * An instance running on the customer's premises that is not managed by + * Cloud SQL. + * + * Generated from protobuf enum ON_PREMISES_INSTANCE = 2; + */ + const ON_PREMISES_INSTANCE = 2; + /** + * A Cloud SQL instance acting as a read-replica. + * + * Generated from protobuf enum READ_REPLICA_INSTANCE = 3; + */ + const READ_REPLICA_INSTANCE = 3; + + private static $valueToName = [ + self::SQL_INSTANCE_TYPE_UNSPECIFIED => 'SQL_INSTANCE_TYPE_UNSPECIFIED', + self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', + self::ON_PREMISES_INSTANCE => 'ON_PREMISES_INSTANCE', + self::READ_REPLICA_INSTANCE => 'READ_REPLICA_INSTANCE', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..cab0a2bad6f7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,161 @@ +google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest + */ +class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * @type \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $body + * Required. The request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php new file mode 100644 index 000000000000..95b0265ee5c4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAcquireSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseResponse + */ +class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php new file mode 100644 index 000000000000..3fd7548f2b0f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesAddServerCaRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesAddServerCaRequest + */ +class SqlInstancesAddServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php new file mode 100644 index 000000000000..f7ca7510d738 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCloneRequest.php @@ -0,0 +1,142 @@ +google.cloud.sql.v1.SqlInstancesCloneRequest + */ +class SqlInstancesCloneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * @type string $project + * Project ID of the source as well as the clone Cloud SQL instance. + * @type \Google\Cloud\Sql\V1\InstancesCloneRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesCloneRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesCloneRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesCloneRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesCloneRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php new file mode 100644 index 000000000000..c86fb60cbadf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesCreateEphemeralCertRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesCreateEphemeralCertRequest + */ +class SqlInstancesCreateEphemeralCertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; + * @return \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsCreateEphemeralRequest body = 100; + * @param \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertsCreateEphemeralRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php new file mode 100644 index 000000000000..f3a80ccc7e80 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDeleteRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesDeleteRequest + */ +class SqlInstancesDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php new file mode 100644 index 000000000000..3b87034db915 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteMasterRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesDemoteMasterRequest + */ +class SqlInstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance name. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteMasterRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesDemoteMasterRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php new file mode 100644 index 000000000000..e014b469ecbf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesDemoteRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1.SqlInstancesDemoteRequest + */ +class SqlInstancesDemoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance name. + * @type string $project + * Required. ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesDemoteRequest $body + * Required. The request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\InstancesDemoteRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesDemoteRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\InstancesDemoteRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesDemoteRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php new file mode 100644 index 000000000000..501b530aab43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesExportRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesExportRequest + */ +class SqlInstancesExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be exported. + * @type \Google\Cloud\Sql\V1\InstancesExportRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesExportRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesExportRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesExportRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesExportRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php new file mode 100644 index 000000000000..f443137e24a0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesFailoverRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesFailoverRequest + */ +class SqlInstancesFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the read replica. + * @type \Google\Cloud\Sql\V1\InstancesFailoverRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesFailoverRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesFailoverRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesFailoverRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesFailoverRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php new file mode 100644 index 000000000000..647f3647e66c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigRequest + */ +class SqlInstancesGetDiskShrinkConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php new file mode 100644 index 000000000000..56f64db0042d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetDiskShrinkConfigResponse.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlInstancesGetDiskShrinkConfigResponse + */ +class SqlInstancesGetDiskShrinkConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + */ + protected $minimal_target_size_gb = 0; + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#getDiskShrinkConfig`. + * @type int|string $minimal_target_size_gb + * The minimum size to which a disk can be shrunk in GigaBytes. + * @type string $message + * Additional message to customers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + * @return int|string + */ + public function getMinimalTargetSizeGb() + { + return $this->minimal_target_size_gb; + } + + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + * @param int|string $var + * @return $this + */ + public function setMinimalTargetSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->minimal_target_size_gb = $var; + + return $this; + } + + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php new file mode 100644 index 000000000000..0cf92a769961 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeRequest + */ +class SqlInstancesGetLatestRecoveryTimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php new file mode 100644 index 000000000000..9a5bfafef504 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetLatestRecoveryTimeResponse.php @@ -0,0 +1,111 @@ +google.cloud.sql.v1.SqlInstancesGetLatestRecoveryTimeResponse + */ +class SqlInstancesGetLatestRecoveryTimeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + */ + protected $latest_recovery_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#getLatestRecoveryTime`. + * @type \Google\Protobuf\Timestamp $latest_recovery_time + * Timestamp, identifies the latest recovery time of the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestRecoveryTime() + { + return $this->latest_recovery_time; + } + + public function hasLatestRecoveryTime() + { + return isset($this->latest_recovery_time); + } + + public function clearLatestRecoveryTime() + { + unset($this->latest_recovery_time); + } + + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestRecoveryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_recovery_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php new file mode 100644 index 000000000000..5d2e86246d5a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesGetRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesGetRequest + */ +class SqlInstancesGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php new file mode 100644 index 000000000000..6a9167d840f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesImportRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesImportRequest + */ +class SqlInstancesImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesImportRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesImportRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesImportRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesImportRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesImportRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php new file mode 100644 index 000000000000..572d4c1dd354 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesInsertRequest.php @@ -0,0 +1,108 @@ +google.cloud.sql.v1.SqlInstancesInsertRequest + */ +class SqlInstancesInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * @type \Google\Cloud\Sql\V1\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php new file mode 100644 index 000000000000..335999acd233 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListRequest.php @@ -0,0 +1,213 @@ +google.cloud.sql.v1.SqlInstancesListRequest + */ +class SqlInstancesListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + */ + protected $filter = ''; + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * @type int $max_results + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project for which to list Cloud SQL instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php new file mode 100644 index 000000000000..8ab5a35297cc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesListServerCasRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesListServerCasRequest + */ +class SqlInstancesListServerCasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php new file mode 100644 index 000000000000..5fbb01eaea97 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPatchRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesPatchRequest + */ +class SqlInstancesPatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php new file mode 100644 index 000000000000..8614588e5314 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPerformDiskShrinkRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1.SqlInstancesPerformDiskShrinkRequest + */ +class SqlInstancesPerformDiskShrinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\PerformDiskShrinkContext $body + * Perform disk shrink context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; + * @return \Google\Cloud\Sql\V1\PerformDiskShrinkContext|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1.PerformDiskShrinkContext body = 100; + * @param \Google\Cloud\Sql\V1\PerformDiskShrinkContext $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PerformDiskShrinkContext::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php new file mode 100644 index 000000000000..6decb87feeb4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesPromoteReplicaRequest.php @@ -0,0 +1,143 @@ +google.cloud.sql.v1.SqlInstancesPromoteReplicaRequest + */ +class SqlInstancesPromoteReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * + * Generated from protobuf field bool failover = 3; + */ + protected $failover = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @type bool $failover + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * + * Generated from protobuf field bool failover = 3; + * @return bool + */ + public function getFailover() + { + return $this->failover; + } + + /** + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * + * Generated from protobuf field bool failover = 3; + * @param bool $var + * @return $this + */ + public function setFailover($var) + { + GPBUtil::checkBool($var); + $this->failover = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php new file mode 100644 index 000000000000..be4171d47bc2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReencryptRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1.SqlInstancesReencryptRequest + */ +class SqlInstancesReencryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesReencryptRequest $body + * Reencrypt body that users request + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; + * @return \Google\Cloud\Sql\V1\InstancesReencryptRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesReencryptRequest body = 3; + * @param \Google\Cloud\Sql\V1\InstancesReencryptRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesReencryptRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php new file mode 100644 index 000000000000..a79384e72450 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseRequest.php @@ -0,0 +1,113 @@ +google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest + */ +class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * @type string $project + * Required. The project ID that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php new file mode 100644 index 000000000000..c155d6d2135d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesReleaseSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseResponse + */ +class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php new file mode 100644 index 000000000000..a761f690b0c0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequest + */ +class SqlInstancesRescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + * @return \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + * @param \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php new file mode 100644 index 000000000000..62b51d5bb1e4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody + */ +class SqlInstancesRescheduleMaintenanceRequestBody extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + */ + protected $reschedule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $reschedule + * Required. The type of the reschedule the user wants. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + * @return \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule|null + */ + public function getReschedule() + { + return $this->reschedule; + } + + public function hasReschedule() + { + return isset($this->reschedule); + } + + public function clearReschedule() + { + unset($this->reschedule); + } + + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + * @param \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $var + * @return $this + */ + public function setReschedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule::class); + $this->reschedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php new file mode 100644 index 000000000000..cb830fe36b1d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php @@ -0,0 +1,124 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule + */ +class Reschedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + */ + protected $reschedule_type = 0; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schedule_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reschedule_type + * Required. The type of the reschedule. + * @type \Google\Protobuf\Timestamp $schedule_time + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + * @return int + */ + public function getRescheduleType() + { + return $this->reschedule_type; + } + + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + * @param int $var + * @return $this + */ + public function setRescheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody\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](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.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](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reschedule::class, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody_Reschedule::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php new file mode 100644 index 000000000000..8b8109bca17b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType + */ +class RescheduleType +{ + /** + * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; + */ + const RESCHEDULE_TYPE_UNSPECIFIED = 0; + /** + * Reschedules maintenance to happen now (within 5 minutes). + * + * Generated from protobuf enum IMMEDIATE = 1; + */ + const IMMEDIATE = 1; + /** + * Reschedules maintenance to occur within one week from the originally + * scheduled day and time. + * + * Generated from protobuf enum NEXT_AVAILABLE_WINDOW = 2; + */ + const NEXT_AVAILABLE_WINDOW = 2; + /** + * Reschedules maintenance to a specific time and day. + * + * 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::NEXT_AVAILABLE_WINDOW => 'NEXT_AVAILABLE_WINDOW', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RescheduleType::class, \Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequestBody_RescheduleType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php new file mode 100644 index 000000000000..b8779a814c01 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetReplicaSizeRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesResetReplicaSizeRequest + */ +class SqlInstancesResetReplicaSizeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php new file mode 100644 index 000000000000..4fd11700c853 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesResetSslConfigRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesResetSslConfigRequest + */ +class SqlInstancesResetSslConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php new file mode 100644 index 000000000000..fd65741f020a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestartRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesRestartRequest + */ +class SqlInstancesRestartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be restarted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php new file mode 100644 index 000000000000..203876cdec69 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRestoreBackupRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesRestoreBackupRequest + */ +class SqlInstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRestoreBackupRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesRestoreBackupRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php new file mode 100644 index 000000000000..0f0c1a5593fa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesRotateServerCaRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesRotateServerCaRequest + */ +class SqlInstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesRotateServerCaRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesRotateServerCaRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php new file mode 100644 index 000000000000..564740e83e4e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartExternalSyncRequest.php @@ -0,0 +1,287 @@ +google.cloud.sql.v1.SqlInstancesStartExternalSyncRequest + */ +class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + */ + protected $sync_mode = 0; + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + */ + protected $skip_verification = false; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sync_parallel_level = 0; + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $migration_type = 0; + protected $sync_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type int $sync_mode + * External sync mode. + * @type bool $skip_verification + * Whether to skip the verification step (VESS). + * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config + * MySQL-specific settings for start external sync. + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * @type int $migration_type + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + * @return int + */ + public function getSyncMode() + { + return $this->sync_mode; + } + + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + * @param int $var + * @return $this + */ + public function setSyncMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); + $this->sync_mode = $var; + + return $this; + } + + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + * @return bool + */ + public function getSkipVerification() + { + return $this->skip_verification; + } + + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + * @param bool $var + * @return $this + */ + public function setSkipVerification($var) + { + GPBUtil::checkBool($var); + $this->skip_verification = $var; + + return $this; + } + + /** + * MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6; + * @return \Google\Cloud\Sql\V1\MySqlSyncConfig|null + */ + public function getMysqlSyncConfig() + { + return $this->readOneof(6); + } + + public function hasMysqlSyncConfig() + { + return $this->hasOneof(6); + } + + /** + * MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6; + * @param \Google\Cloud\Sql\V1\MySqlSyncConfig $var + * @return $this + */ + public function setMysqlSyncConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlSyncConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSyncConfig() + { + return $this->whichOneof("sync_config"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php new file mode 100644 index 000000000000..cd9d636bd47d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStartReplicaRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesStartReplicaRequest + */ +class SqlInstancesStartReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php new file mode 100644 index 000000000000..8460b58e74e7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesStopReplicaRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlInstancesStopReplicaRequest + */ +class SqlInstancesStopReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php new file mode 100644 index 000000000000..d2194c9f7ac0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesSwitchoverRequest.php @@ -0,0 +1,153 @@ +google.cloud.sql.v1.SqlInstancesSwitchoverRequest + */ +class SqlInstancesSwitchoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the replica. + * @type \Google\Protobuf\Duration $db_timeout + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getDbTimeout() + { + return $this->db_timeout; + } + + public function hasDbTimeout() + { + return isset($this->db_timeout); + } + + public function clearDbTimeout() + { + unset($this->db_timeout); + } + + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDbTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->db_timeout = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php new file mode 100644 index 000000000000..902c6634648a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesTruncateLogRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesTruncateLogRequest + */ +class SqlInstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type \Google\Cloud\Sql\V1\InstancesTruncateLogRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; + * @return \Google\Cloud\Sql\V1\InstancesTruncateLogRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.InstancesTruncateLogRequest body = 100; + * @param \Google\Cloud\Sql\V1\InstancesTruncateLogRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesTruncateLogRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php new file mode 100644 index 000000000000..a1835cce803e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesUpdateRequest.php @@ -0,0 +1,138 @@ +google.cloud.sql.v1.SqlInstancesUpdateRequest + */ +class SqlInstancesUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php new file mode 100644 index 000000000000..85a3bda3af9a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php @@ -0,0 +1,321 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest + */ +class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + */ + protected $verify_connection_only = false; + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + */ + protected $sync_mode = 0; + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $verify_replication_only = false; + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $migration_type = 0; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sync_parallel_level = 0; + protected $sync_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type bool $verify_connection_only + * Flag to enable verifying connection only + * @type int $sync_mode + * External sync mode + * @type bool $verify_replication_only + * Optional. Flag to verify settings required by replication setup only + * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config + * Optional. MySQL-specific settings for start external sync. + * @type int $migration_type + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + * @return bool + */ + public function getVerifyConnectionOnly() + { + return $this->verify_connection_only; + } + + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + * @param bool $var + * @return $this + */ + public function setVerifyConnectionOnly($var) + { + GPBUtil::checkBool($var); + $this->verify_connection_only = $var; + + return $this; + } + + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + * @return int + */ + public function getSyncMode() + { + return $this->sync_mode; + } + + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + * @param int $var + * @return $this + */ + public function setSyncMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); + $this->sync_mode = $var; + + return $this; + } + + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getVerifyReplicationOnly() + { + return $this->verify_replication_only; + } + + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setVerifyReplicationOnly($var) + { + GPBUtil::checkBool($var); + $this->verify_replication_only = $var; + + return $this; + } + + /** + * Optional. MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\MySqlSyncConfig|null + */ + public function getMysqlSyncConfig() + { + return $this->readOneof(6); + } + + public function hasMysqlSyncConfig() + { + return $this->hasOneof(6); + } + + /** + * Optional. MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\MySqlSyncConfig $var + * @return $this + */ + public function setMysqlSyncConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\MySqlSyncConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + + /** + * @return string + */ + public function getSyncConfig() + { + return $this->whichOneof("sync_config"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php new file mode 100644 index 000000000000..81bc7e811bfc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode + */ +class ExternalSyncMode +{ + /** + * Unknown external sync mode, will be defaulted to ONLINE mode + * + * Generated from protobuf enum EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; + */ + const EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; + /** + * Online external sync will set up replication after initial data external + * sync + * + * Generated from protobuf enum ONLINE = 1; + */ + const ONLINE = 1; + /** + * Offline external sync only dumps and loads a one-time snapshot of + * the primary instance's data + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + + private static $valueToName = [ + self::EXTERNAL_SYNC_MODE_UNSPECIFIED => 'EXTERNAL_SYNC_MODE_UNSPECIFIED', + self::ONLINE => 'ONLINE', + self::OFFLINE => 'OFFLINE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExternalSyncMode::class, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest_ExternalSyncMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php new file mode 100644 index 000000000000..94b056a51ce2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType + */ +class MigrationType +{ + /** + * Default value is logical migration + * + * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0; + */ + const MIGRATION_TYPE_UNSPECIFIED = 0; + /** + * Logical Migrations + * + * Generated from protobuf enum LOGICAL = 1; + */ + const LOGICAL = 1; + /** + * Physical file based Migrations + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED', + self::LOGICAL => 'LOGICAL', + self::PHYSICAL => 'PHYSICAL', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MigrationType::class, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest_MigrationType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php new file mode 100644 index 000000000000..9765ba2aa15c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlInstancesVerifyExternalSyncSettingsResponse.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsResponse + */ +class SqlInstancesVerifyExternalSyncSettingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; + */ + private $errors; + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; + */ + private $warnings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#migrationSettingErrorList`. + * @type array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $errors + * List of migration violations. + * @type array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $warnings + * List of migration warnings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError errors = 2; + * @param array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError::class); + $this->errors = $arr; + + return $this; + } + + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SqlExternalSyncSettingError warnings = 3; + * @param array<\Google\Cloud\Sql\V1\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SqlExternalSyncSettingError::class); + $this->warnings = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php new file mode 100644 index 000000000000..a4db37dc4140 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlIpAddressType.php @@ -0,0 +1,83 @@ +google.cloud.sql.v1.SqlIpAddressType + */ +class SqlIpAddressType +{ + /** + * This is an unknown IP address type. + * + * Generated from protobuf enum SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; + */ + const SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; + /** + * IP address the customer is supposed to connect to. Usually this is the + * load balancer's IP address + * + * Generated from protobuf enum PRIMARY = 1; + */ + const PRIMARY = 1; + /** + * Source IP address of the connection a read replica establishes to its + * external primary instance. This IP address can be allowlisted by the + * customer in case it has a firewall that filters incoming connection to its + * on premises primary instance. + * + * Generated from protobuf enum OUTGOING = 2; + */ + const OUTGOING = 2; + /** + * Private IP used when using private IPs and network peering. + * + * Generated from protobuf enum PRIVATE = 3; + */ + const PBPRIVATE = 3; + /** + * V1 IP of a migrated instance. We want the user to + * decommission this IP as soon as the migration is complete. + * Note: V1 instances with V1 ip addresses will be counted as PRIMARY. + * + * Generated from protobuf enum MIGRATED_1ST_GEN = 4; + */ + const MIGRATED_1ST_GEN = 4; + + private static $valueToName = [ + self::SQL_IP_ADDRESS_TYPE_UNSPECIFIED => 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED', + self::PRIMARY => 'PRIMARY', + self::OUTGOING => 'OUTGOING', + self::PBPRIVATE => 'PRIVATE', + self::MIGRATED_1ST_GEN => 'MIGRATED_1ST_GEN', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php new file mode 100644 index 000000000000..6f519700a0f1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsCancelRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlOperationsCancelRequest + */ +class SqlOperationsCancelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php new file mode 100644 index 000000000000..3d8bb11843ab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsGetRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlOperationsGetRequest + */ +class SqlOperationsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php new file mode 100644 index 000000000000..7824a1ca0552 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlOperationsListRequest.php @@ -0,0 +1,173 @@ +google.cloud.sql.v1.SqlOperationsListRequest + */ +class SqlOperationsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type int $max_results + * Maximum number of operations per response. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlOperations::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php new file mode 100644 index 000000000000..2752c3156e60 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlPricingPlan.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1.SqlPricingPlan + */ +class SqlPricingPlan +{ + /** + * This is an unknown pricing plan for this instance. + * + * Generated from protobuf enum SQL_PRICING_PLAN_UNSPECIFIED = 0; + */ + const SQL_PRICING_PLAN_UNSPECIFIED = 0; + /** + * The instance is billed at a monthly flat rate. + * + * Generated from protobuf enum PACKAGE = 1; + */ + const PACKAGE = 1; + /** + * The instance is billed per usage. + * + * Generated from protobuf enum PER_USE = 2; + */ + const PER_USE = 2; + + private static $valueToName = [ + self::SQL_PRICING_PLAN_UNSPECIFIED => 'SQL_PRICING_PLAN_UNSPECIFIED', + self::PACKAGE => 'PACKAGE', + self::PER_USE => 'PER_USE', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php new file mode 100644 index 000000000000..d96c9de2d50f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlReplicationType.php @@ -0,0 +1,63 @@ +google.cloud.sql.v1.SqlReplicationType + */ +class SqlReplicationType +{ + /** + * This is an unknown replication type for a Cloud SQL instance. + * + * Generated from protobuf enum SQL_REPLICATION_TYPE_UNSPECIFIED = 0; + */ + const SQL_REPLICATION_TYPE_UNSPECIFIED = 0; + /** + * The synchronous replication mode for First Generation instances. It is the + * default value. + * + * Generated from protobuf enum SYNCHRONOUS = 1; + */ + const SYNCHRONOUS = 1; + /** + * The asynchronous replication mode for First Generation instances. It + * provides a slight performance gain, but if an outage occurs while this + * option is set to asynchronous, you can lose up to a few seconds of updates + * to your data. + * + * Generated from protobuf enum ASYNCHRONOUS = 2; + */ + const ASYNCHRONOUS = 2; + + private static $valueToName = [ + self::SQL_REPLICATION_TYPE_UNSPECIFIED => 'SQL_REPLICATION_TYPE_UNSPECIFIED', + self::SYNCHRONOUS => 'SYNCHRONOUS', + self::ASYNCHRONOUS => 'ASYNCHRONOUS', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php new file mode 100644 index 000000000000..6f65acfdf334 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerAuditConfig.php @@ -0,0 +1,189 @@ +google.cloud.sql.v1.SqlServerAuditConfig + */ +class SqlServerAuditConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + */ + protected $bucket = ''; + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + */ + protected $retention_interval = null; + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + */ + protected $upload_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#sqlServerAuditConfig + * @type string $bucket + * The name of the destination bucket (e.g., gs://mybucket). + * @type \Google\Protobuf\Duration $retention_interval + * How long to keep generated audit files. + * @type \Google\Protobuf\Duration $upload_interval + * How often to upload generated audit files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionInterval() + { + return $this->retention_interval; + } + + public function hasRetentionInterval() + { + return isset($this->retention_interval); + } + + public function clearRetentionInterval() + { + unset($this->retention_interval); + } + + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_interval = $var; + + return $this; + } + + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getUploadInterval() + { + return $this->upload_interval; + } + + public function hasUploadInterval() + { + return isset($this->upload_interval); + } + + public function clearUploadInterval() + { + unset($this->upload_interval); + } + + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUploadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->upload_interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php new file mode 100644 index 000000000000..98d2b10fb0aa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerDatabaseDetails.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlServerDatabaseDetails + */ +class SqlServerDatabaseDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + */ + protected $compatibility_level = 0; + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + */ + protected $recovery_model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $compatibility_level + * The version of SQL Server with which the database is to be made compatible + * @type string $recovery_model + * The recovery model of a SQL Server database + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + * @return int + */ + public function getCompatibilityLevel() + { + return $this->compatibility_level; + } + + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + * @param int $var + * @return $this + */ + public function setCompatibilityLevel($var) + { + GPBUtil::checkInt32($var); + $this->compatibility_level = $var; + + return $this; + } + + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + * @return string + */ + public function getRecoveryModel() + { + return $this->recovery_model; + } + + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + * @param string $var + * @return $this + */ + public function setRecoveryModel($var) + { + GPBUtil::checkString($var, True); + $this->recovery_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php new file mode 100644 index 000000000000..3b85c94c2bab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlServerUserDetails.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SqlServerUserDetails + */ +class SqlServerUserDetails extends \Google\Protobuf\Internal\Message +{ + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + */ + protected $disabled = false; + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + */ + private $server_roles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $disabled + * If the user has been disabled + * @type array|\Google\Protobuf\Internal\RepeatedField $server_roles + * The server roles for this user + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerRoles() + { + return $this->server_roles; + } + + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerRoles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->server_roles = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php new file mode 100644 index 000000000000..56c21ca3bac9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsDeleteRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1.SqlSslCertsDeleteRequest + */ +class SqlSslCertsDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + */ + protected $sha1_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1_fingerprint + * Sha1 FingerPrint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php new file mode 100644 index 000000000000..bf1d185a176f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsGetRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1.SqlSslCertsGetRequest + */ +class SqlSslCertsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + */ + protected $sha1_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1_fingerprint + * Sha1 FingerPrint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php new file mode 100644 index 000000000000..534e0d079f27 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1.SqlSslCertsInsertRequest + */ +class SqlSslCertsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\SslCertsInsertRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; + * @return \Google\Cloud\Sql\V1\SslCertsInsertRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SslCertsInsertRequest body = 100; + * @param \Google\Cloud\Sql\V1\SslCertsInsertRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertsInsertRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php new file mode 100644 index 000000000000..1d17b4d8f053 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSslCertsListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1.SqlSslCertsListRequest + */ +class SqlSslCertsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php new file mode 100644 index 000000000000..0cd862973ac3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlSuspensionReason.php @@ -0,0 +1,78 @@ +google.cloud.sql.v1.SqlSuspensionReason + */ +class SqlSuspensionReason +{ + /** + * This is an unknown suspension reason. + * + * Generated from protobuf enum SQL_SUSPENSION_REASON_UNSPECIFIED = 0; + */ + const SQL_SUSPENSION_REASON_UNSPECIFIED = 0; + /** + * The instance is suspended due to billing issues (for example:, GCP account + * issue) + * + * Generated from protobuf enum BILLING_ISSUE = 2; + */ + const BILLING_ISSUE = 2; + /** + * The instance is suspended due to illegal content (for example:, child + * pornography, copyrighted material, etc.). + * + * Generated from protobuf enum LEGAL_ISSUE = 3; + */ + const LEGAL_ISSUE = 3; + /** + * The instance is causing operational issues (for example:, causing the + * database to crash). + * + * Generated from protobuf enum OPERATIONAL_ISSUE = 4; + */ + const OPERATIONAL_ISSUE = 4; + /** + * The KMS key used by the instance is either revoked or denied access to + * + * Generated from protobuf enum KMS_KEY_ISSUE = 5; + */ + const KMS_KEY_ISSUE = 5; + + private static $valueToName = [ + self::SQL_SUSPENSION_REASON_UNSPECIFIED => 'SQL_SUSPENSION_REASON_UNSPECIFIED', + self::BILLING_ISSUE => 'BILLING_ISSUE', + self::LEGAL_ISSUE => 'LEGAL_ISSUE', + self::OPERATIONAL_ISSUE => 'OPERATIONAL_ISSUE', + self::KMS_KEY_ISSUE => 'KMS_KEY_ISSUE', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php new file mode 100644 index 000000000000..37497ea9de91 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlTiersListRequest.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlTiersListRequest + */ +class SqlTiersListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID of the project for which to list tiers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php new file mode 100644 index 000000000000..88e415c33b22 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUpdateTrack.php @@ -0,0 +1,73 @@ +google.cloud.sql.v1.SqlUpdateTrack + */ +class SqlUpdateTrack +{ + /** + * This is an unknown maintenance timing preference. + * + * Generated from protobuf enum SQL_UPDATE_TRACK_UNSPECIFIED = 0; + */ + const SQL_UPDATE_TRACK_UNSPECIFIED = 0; + /** + * For instance update that requires a restart, this update track indicates + * your instance prefer to restart for new version early in maintenance + * window. + * + * Generated from protobuf enum canary = 1; + */ + const canary = 1; + /** + * For instance update that requires a restart, this update track indicates + * your instance prefer to let Cloud SQL choose the timing of restart (within + * its Maintenance window, if applicable). + * + * Generated from protobuf enum stable = 2; + */ + const stable = 2; + /** + * For instance update that requires a restart, this update track indicates + * your instance prefer to let Cloud SQL choose the timing of restart (within + * its Maintenance window, if applicable) to be at least 5 weeks after the + * notification. + * + * Generated from protobuf enum week5 = 3; + */ + const week5 = 3; + + private static $valueToName = [ + self::SQL_UPDATE_TRACK_UNSPECIFIED => 'SQL_UPDATE_TRACK_UNSPECIFIED', + self::canary => 'canary', + self::stable => 'stable', + self::week5 => 'week5', + ]; + + 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/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php new file mode 100644 index 000000000000..5c934f9681fb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersDeleteRequest.php @@ -0,0 +1,167 @@ +google.cloud.sql.v1.SqlUsersDeleteRequest + */ +class SqlUsersDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + */ + protected $host = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php new file mode 100644 index 000000000000..b018b7342a5e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersGetRequest.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1.SqlUsersGetRequest + */ +class SqlUsersGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + */ + protected $host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * User of the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $host + * Host of a user of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php new file mode 100644 index 000000000000..98e3d15e852a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1.SqlUsersInsertRequest + */ +class SqlUsersInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\User $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @return \Google\Cloud\Sql\V1\User|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @param \Google\Cloud\Sql\V1\User $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\User::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php new file mode 100644 index 000000000000..5b1872f2a7c5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1.SqlUsersListRequest + */ +class SqlUsersListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php new file mode 100644 index 000000000000..b1e560c6a665 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SqlUsersUpdateRequest.php @@ -0,0 +1,204 @@ +google.cloud.sql.v1.SqlUsersUpdateRequest + */ +class SqlUsersUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $host = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Optional. Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1\User $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @return \Google\Cloud\Sql\V1\User|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.User body = 100; + * @param \Google\Cloud\Sql\V1\User $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\User::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php new file mode 100644 index 000000000000..1f6d18839eeb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCert.php @@ -0,0 +1,375 @@ +google.cloud.sql.v1.SslCert + */ +class SslCert extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + */ + protected $cert_serial_number = ''; + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + */ + protected $cert = ''; + /** + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + */ + protected $common_name = ''; + /** + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + */ + protected $expiration_time = null; + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + */ + protected $sha1_fingerprint = ''; + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + */ + protected $self_link = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCert`. + * @type string $cert_serial_number + * Serial number, as extracted from the certificate. + * @type string $cert + * PEM representation. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * @type string $common_name + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * @type \Google\Protobuf\Timestamp $expiration_time + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $sha1_fingerprint + * Sha1 Fingerprint. + * @type string $instance + * Name of the database instance. + * @type string $self_link + * The URI of this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + * @return string + */ + public function getCertSerialNumber() + { + return $this->cert_serial_number; + } + + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + * @param string $var + * @return $this + */ + public function setCertSerialNumber($var) + { + GPBUtil::checkString($var, True); + $this->cert_serial_number = $var; + + return $this; + } + + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + * @return string + */ + public function getCert() + { + return $this->cert; + } + + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + * @param string $var + * @return $this + */ + public function setCert($var) + { + GPBUtil::checkString($var, True); + $this->cert = $var; + + return $this; + } + + /** + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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); + } + + /** + * The time when the certificate was created in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z` + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + * @return string + */ + public function getCommonName() + { + return $this->common_name; + } + + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + * @param string $var + * @return $this + */ + public function setCommonName($var) + { + GPBUtil::checkString($var, True); + $this->common_name = $var; + + return $this; + } + + /** + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * The time when the certificate expires in [RFC + * 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php new file mode 100644 index 000000000000..4d9eb12d3397 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertDetail.php @@ -0,0 +1,115 @@ +google.cloud.sql.v1.SslCertDetail + */ +class SslCertDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; + */ + protected $cert_info = null; + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + */ + protected $cert_private_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\SslCert $cert_info + * The public information about the cert. + * @type string $cert_private_key + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getCertInfo() + { + return $this->cert_info; + } + + public function hasCertInfo() + { + return isset($this->cert_info); + } + + public function clearCertInfo() + { + unset($this->cert_info); + } + + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert cert_info = 1; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setCertInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->cert_info = $var; + + return $this; + } + + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + * @return string + */ + public function getCertPrivateKey() + { + return $this->cert_private_key; + } + + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + * @param string $var + * @return $this + */ + public function setCertPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->cert_private_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php new file mode 100644 index 000000000000..3652c5694a2a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsCreateEphemeralRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SslCertsCreateEphemeralRequest + */ +class SslCertsCreateEphemeralRequest extends \Google\Protobuf\Internal\Message +{ + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + */ + protected $public_key = ''; + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + */ + protected $access_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $public_key + * PEM encoded public key to include in the signed certificate. + * @type string $access_token + * Access token to include in the signed certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php new file mode 100644 index 000000000000..ee4048262803 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertRequest.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.SslCertsInsertRequest + */ +class SslCertsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + */ + protected $common_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $common_name + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + * @return string + */ + public function getCommonName() + { + return $this->common_name; + } + + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + * @param string $var + * @return $this + */ + public function setCommonName($var) + { + GPBUtil::checkString($var, True); + $this->common_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php new file mode 100644 index 000000000000..8c78bd59278f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsInsertResponse.php @@ -0,0 +1,207 @@ +google.cloud.sql.v1.SslCertsInsertResponse + */ +class SslCertsInsertResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; + */ + protected $operation = null; + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; + */ + protected $server_ca_cert = null; + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; + */ + protected $client_cert = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCertsInsert`. + * @type \Google\Cloud\Sql\V1\Operation $operation + * The operation to track the ssl certs insert request. + * @type \Google\Cloud\Sql\V1\SslCert $server_ca_cert + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * @type \Google\Cloud\Sql\V1\SslCertDetail $client_cert + * The new client certificate and private key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; + * @return \Google\Cloud\Sql\V1\Operation|null + */ + public function getOperation() + { + return $this->operation; + } + + public function hasOperation() + { + return isset($this->operation); + } + + public function clearOperation() + { + unset($this->operation); + } + + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1.Operation operation = 2; + * @param \Google\Cloud\Sql\V1\Operation $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\Operation::class); + $this->operation = $var; + + return $this; + } + + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; + * @return \Google\Cloud\Sql\V1\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCert server_ca_cert = 3; + * @param \Google\Cloud\Sql\V1\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; + * @return \Google\Cloud\Sql\V1\SslCertDetail|null + */ + public function getClientCert() + { + return $this->client_cert; + } + + public function hasClientCert() + { + return isset($this->client_cert); + } + + public function clearClientCert() + { + unset($this->client_cert); + } + + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1.SslCertDetail client_cert = 4; + * @param \Google\Cloud\Sql\V1\SslCertDetail $var + * @return $this + */ + public function setClientCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SslCertDetail::class); + $this->client_cert = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php new file mode 100644 index 000000000000..7ecb980459f4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SslCertsListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.SslCertsListResponse + */ +class SslCertsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCertsList`. + * @type array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $items + * List of client certificates for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlSslCerts::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.SslCert items = 2; + * @param array<\Google\Cloud\Sql\V1\SslCert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\SslCert::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php new file mode 100644 index 000000000000..cf7b01c0902d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/SyncFlags.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1.SyncFlags + */ +class SyncFlags extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the flag. + * @type string $value + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php new file mode 100644 index 000000000000..7be60ec5d8bd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/Tier.php @@ -0,0 +1,207 @@ +google.cloud.sql.v1.Tier + */ +class Tier extends \Google\Protobuf\Internal\Message +{ + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + */ + protected $tier = ''; + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + */ + protected $RAM = 0; + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + */ + protected $Disk_Quota = 0; + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + */ + private $region; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tier + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * @type int|string $RAM + * The maximum RAM usage of this tier in bytes. + * @type string $kind + * This is always `sql#tier`. + * @type int|string $Disk_Quota + * The maximum disk size of this tier in bytes. + * @type array|\Google\Protobuf\Internal\RepeatedField $region + * The applicable regions for this tier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + * @return string + */ + public function getTier() + { + return $this->tier; + } + + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + * @param string $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkString($var, True); + $this->tier = $var; + + return $this; + } + + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + * @return int|string + */ + public function getRAM() + { + return $this->RAM; + } + + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + * @param int|string $var + * @return $this + */ + public function setRAM($var) + { + GPBUtil::checkInt64($var); + $this->RAM = $var; + + return $this; + } + + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + * @return int|string + */ + public function getDiskQuota() + { + return $this->Disk_Quota; + } + + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + * @param int|string $var + * @return $this + */ + public function setDiskQuota($var) + { + GPBUtil::checkInt64($var); + $this->Disk_Quota = $var; + + return $this; + } + + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegion() + { + return $this->region; + } + + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->region = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php new file mode 100644 index 000000000000..f43549e0960f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TiersListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1.TiersListResponse + */ +class TiersListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#tiersList`. + * @type array<\Google\Cloud\Sql\V1\Tier>|\Google\Protobuf\Internal\RepeatedField $items + * List of tiers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.Tier items = 2; + * @param array<\Google\Cloud\Sql\V1\Tier>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\Tier::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php new file mode 100644 index 000000000000..e97d8dbfdb71 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/TruncateLogContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1.TruncateLogContext + */ +class TruncateLogContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + */ + protected $log_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#truncateLogContext`. + * @type string $log_type + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + * @return string + */ + public function getLogType() + { + return $this->log_type; + } + + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + * @param string $var + * @return $this + */ + public function setLogType($var) + { + GPBUtil::checkString($var, True); + $this->log_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php new file mode 100644 index 000000000000..d77a1fd3563c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User.php @@ -0,0 +1,474 @@ +google.cloud.sql.v1.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $host = ''; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + */ + protected $instance = ''; + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + */ + protected $project = ''; + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; + */ + protected $type = 0; + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; + */ + protected $password_policy = null; + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; + */ + protected $dual_password_type = null; + protected $user_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#user`. + * @type string $password + * The password for the user. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. + * @type string $name + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * @type string $host + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * @type string $instance + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * @type string $project + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * @type int $type + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * @type \Google\Cloud\Sql\V1\SqlServerUserDetails $sqlserver_user_details + * @type \Google\Cloud\Sql\V1\UserPasswordValidationPolicy $password_policy + * User level password validation policy. + * @type int $dual_password_type + * Dual password status for the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for `update` because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for `update` because + * it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1.User.SqlUserType type = 8; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\User\SqlUserType::class); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9; + * @return \Google\Cloud\Sql\V1\SqlServerUserDetails|null + */ + public function getSqlserverUserDetails() + { + return $this->readOneof(9); + } + + public function hasSqlserverUserDetails() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9; + * @param \Google\Cloud\Sql\V1\SqlServerUserDetails $var + * @return $this + */ + public function setSqlserverUserDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\SqlServerUserDetails::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; + * @return \Google\Cloud\Sql\V1\UserPasswordValidationPolicy|null + */ + public function getPasswordPolicy() + { + return $this->password_policy; + } + + public function hasPasswordPolicy() + { + return isset($this->password_policy); + } + + public function clearPasswordPolicy() + { + unset($this->password_policy); + } + + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12; + * @param \Google\Cloud\Sql\V1\UserPasswordValidationPolicy $var + * @return $this + */ + public function setPasswordPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\UserPasswordValidationPolicy::class); + $this->password_policy = $var; + + return $this; + } + + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; + * @return int + */ + public function getDualPasswordType() + { + return isset($this->dual_password_type) ? $this->dual_password_type : 0; + } + + public function hasDualPasswordType() + { + return isset($this->dual_password_type); + } + + public function clearDualPasswordType() + { + unset($this->dual_password_type); + } + + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13; + * @param int $var + * @return $this + */ + public function setDualPasswordType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\User\DualPasswordType::class); + $this->dual_password_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getUserDetails() + { + return $this->whichOneof("user_details"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php new file mode 100644 index 000000000000..02da08dd9a1f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/DualPasswordType.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1.User.DualPasswordType + */ +class DualPasswordType +{ + /** + * The default value. + * + * Generated from protobuf enum DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; + */ + const DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; + /** + * Do not update the user's dual password status. + * + * Generated from protobuf enum NO_MODIFY_DUAL_PASSWORD = 1; + */ + const NO_MODIFY_DUAL_PASSWORD = 1; + /** + * No dual password usable for connecting using this user. + * + * Generated from protobuf enum NO_DUAL_PASSWORD = 2; + */ + const NO_DUAL_PASSWORD = 2; + /** + * Dual password usable for connecting using this user. + * + * Generated from protobuf enum DUAL_PASSWORD = 3; + */ + const DUAL_PASSWORD = 3; + + private static $valueToName = [ + self::DUAL_PASSWORD_TYPE_UNSPECIFIED => 'DUAL_PASSWORD_TYPE_UNSPECIFIED', + self::NO_MODIFY_DUAL_PASSWORD => 'NO_MODIFY_DUAL_PASSWORD', + self::NO_DUAL_PASSWORD => 'NO_DUAL_PASSWORD', + self::DUAL_PASSWORD => 'DUAL_PASSWORD', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DualPasswordType::class, \Google\Cloud\Sql\V1\User_DualPasswordType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php new file mode 100644 index 000000000000..4f6c75f172b9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/User/SqlUserType.php @@ -0,0 +1,85 @@ +google.cloud.sql.v1.User.SqlUserType + */ +class SqlUserType +{ + /** + * The database's built-in user type. + * + * Generated from protobuf enum BUILT_IN = 0; + */ + const BUILT_IN = 0; + /** + * Cloud IAM user. + * + * Generated from protobuf enum CLOUD_IAM_USER = 1; + */ + const CLOUD_IAM_USER = 1; + /** + * Cloud IAM service account. + * + * Generated from protobuf enum CLOUD_IAM_SERVICE_ACCOUNT = 2; + */ + const CLOUD_IAM_SERVICE_ACCOUNT = 2; + /** + * Cloud IAM group non-login user. + * + * Generated from protobuf enum CLOUD_IAM_GROUP = 3; + */ + const CLOUD_IAM_GROUP = 3; + /** + * Cloud IAM group login user. + * + * Generated from protobuf enum CLOUD_IAM_GROUP_USER = 4; + */ + const CLOUD_IAM_GROUP_USER = 4; + /** + * Cloud IAM group login service account. + * + * Generated from protobuf enum CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; + */ + const CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; + + private static $valueToName = [ + self::BUILT_IN => 'BUILT_IN', + self::CLOUD_IAM_USER => 'CLOUD_IAM_USER', + self::CLOUD_IAM_SERVICE_ACCOUNT => 'CLOUD_IAM_SERVICE_ACCOUNT', + self::CLOUD_IAM_GROUP => 'CLOUD_IAM_GROUP', + self::CLOUD_IAM_GROUP_USER => 'CLOUD_IAM_GROUP_USER', + self::CLOUD_IAM_GROUP_SERVICE_ACCOUNT => 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlUserType::class, \Google\Cloud\Sql\V1\User_SqlUserType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php new file mode 100644 index 000000000000..5db3484ac7c2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UserPasswordValidationPolicy.php @@ -0,0 +1,227 @@ +google.cloud.sql.v1.UserPasswordValidationPolicy + */ +class UserPasswordValidationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + */ + protected $allowed_failed_attempts = 0; + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + */ + protected $password_expiration_duration = null; + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + */ + protected $enable_failed_attempts_check = false; + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + */ + protected $enable_password_verification = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $allowed_failed_attempts + * Number of failed login attempts allowed before user get locked. + * @type \Google\Protobuf\Duration $password_expiration_duration + * Expiration duration after password is updated. + * @type bool $enable_failed_attempts_check + * If true, failed login attempts check will be enabled. + * @type \Google\Cloud\Sql\V1\PasswordStatus $status + * Output only. Read-only password status. + * @type bool $enable_password_verification + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + * @return int + */ + public function getAllowedFailedAttempts() + { + return $this->allowed_failed_attempts; + } + + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + * @param int $var + * @return $this + */ + public function setAllowedFailedAttempts($var) + { + GPBUtil::checkInt32($var); + $this->allowed_failed_attempts = $var; + + return $this; + } + + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getPasswordExpirationDuration() + { + return $this->password_expiration_duration; + } + + public function hasPasswordExpirationDuration() + { + return isset($this->password_expiration_duration); + } + + public function clearPasswordExpirationDuration() + { + unset($this->password_expiration_duration); + } + + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPasswordExpirationDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->password_expiration_duration = $var; + + return $this; + } + + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + * @return bool + */ + public function getEnableFailedAttemptsCheck() + { + return $this->enable_failed_attempts_check; + } + + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + * @param bool $var + * @return $this + */ + public function setEnableFailedAttemptsCheck($var) + { + GPBUtil::checkBool($var); + $this->enable_failed_attempts_check = $var; + + return $this; + } + + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Sql\V1\PasswordStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Sql\V1\PasswordStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\PasswordStatus::class); + $this->status = $var; + + return $this; + } + + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + * @return bool + */ + public function getEnablePasswordVerification() + { + return $this->enable_password_verification; + } + + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + * @param bool $var + * @return $this + */ + public function setEnablePasswordVerification($var) + { + GPBUtil::checkBool($var); + $this->enable_password_verification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php new file mode 100644 index 000000000000..4023ff5fc2bf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/proto/src/Google/Cloud/Sql/V1/UsersListResponse.php @@ -0,0 +1,140 @@ +google.cloud.sql.v1.UsersListResponse + */ +class UsersListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#usersList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; + */ + private $items; + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @deprecated + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#usersList`. + * @type array<\Google\Cloud\Sql\V1\User>|\Google\Protobuf\Internal\RepeatedField $items + * List of user resources in the instance. + * @type string $next_page_token + * Unused. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#usersList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#usersList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1.User items = 2; + * @param array<\Google\Cloud\Sql\V1\User>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1\User::class); + $this->items = $arr; + + return $this; + } + + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getNextPageToken() + { + @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); + return $this->next_page_token; + } + + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setNextPageToken($var) + { + @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php new file mode 100644 index 000000000000..3c14bb21208a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php new file mode 100644 index 000000000000..afa9913adb03 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php new file mode 100644 index 000000000000..ea1b4c617c63 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/insert.php @@ -0,0 +1,57 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php new file mode 100644 index 000000000000..8b8a1d8bfdfc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlBackupRunsServiceClient/list.php @@ -0,0 +1,59 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlBackupRunsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php new file mode 100644 index 000000000000..c2425b500411 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php @@ -0,0 +1,60 @@ +generateEphemeralCert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlConnectService_GenerateEphemeralCert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php new file mode 100644 index 000000000000..b170636acde3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlConnectServiceClient/get_connect_settings.php @@ -0,0 +1,57 @@ +getConnectSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlConnectService_GetConnectSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php new file mode 100644 index 000000000000..e99a3f2bf791 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php new file mode 100644 index 000000000000..bf33a4db331d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/get.php @@ -0,0 +1,58 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php new file mode 100644 index 000000000000..215022a1cd3a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/insert.php @@ -0,0 +1,60 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php new file mode 100644 index 000000000000..d2f9f97c5542 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php new file mode 100644 index 000000000000..71d182cb0137 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/patch.php @@ -0,0 +1,58 @@ +patch($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php new file mode 100644 index 000000000000..68601967795d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlDatabasesServiceClient/update.php @@ -0,0 +1,58 @@ +update($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlDatabasesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php new file mode 100644 index 000000000000..d129c9b22da1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlFlagsServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlFlagsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php new file mode 100644 index 000000000000..eb1711a8938e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php @@ -0,0 +1,80 @@ +setInstance($instance) + ->setProject($project) + ->setBody($body); + + // Call the API and handle any network failures. + try { + /** @var SqlInstancesAcquireSsrsLeaseResponse $response */ + $response = $sqlInstancesServiceClient->acquireSsrsLease($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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + acquire_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1_generated_SqlInstancesService_AcquireSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php new file mode 100644 index 000000000000..3f365b95cca6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/add_server_ca.php @@ -0,0 +1,61 @@ +addServerCa($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_AddServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php new file mode 100644 index 000000000000..50edbc47572f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/clone.php @@ -0,0 +1,58 @@ +clone($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Clone_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php new file mode 100644 index 000000000000..c207649669a3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/create_ephemeral.php @@ -0,0 +1,60 @@ +createEphemeral($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_CreateEphemeral_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php new file mode 100644 index 000000000000..a4b275b5844f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php new file mode 100644 index 000000000000..01a4b26624b6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote.php @@ -0,0 +1,87 @@ +setSourceRepresentativeInstanceName($bodyDemoteContextSourceRepresentativeInstanceName); + $body = (new InstancesDemoteRequest()) + ->setDemoteContext($bodyDemoteContext); + $request = (new SqlInstancesDemoteRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + + // Call the API and handle any network failures. + try { + /** @var Operation $response */ + $response = $sqlInstancesServiceClient->demote($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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + $bodyDemoteContextSourceRepresentativeInstanceName = '[SOURCE_REPRESENTATIVE_INSTANCE_NAME]'; + + demote_sample($instance, $project, $bodyDemoteContextSourceRepresentativeInstanceName); +} +// [END sqladmin_v1_generated_SqlInstancesService_Demote_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php new file mode 100644 index 000000000000..dbf950be9fb1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/demote_master.php @@ -0,0 +1,58 @@ +demoteMaster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_DemoteMaster_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php new file mode 100644 index 000000000000..070a2ceaf657 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/export.php @@ -0,0 +1,58 @@ +export($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Export_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php new file mode 100644 index 000000000000..4882dda8ba22 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/failover.php @@ -0,0 +1,64 @@ +failover($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Failover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php new file mode 100644 index 000000000000..743f86f11906 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php new file mode 100644 index 000000000000..e97c4fa67898 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php @@ -0,0 +1,57 @@ +getDiskShrinkConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_GetDiskShrinkConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php new file mode 100644 index 000000000000..5ffd507acd8f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php @@ -0,0 +1,57 @@ +getLatestRecoveryTime($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_GetLatestRecoveryTime_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php new file mode 100644 index 000000000000..864538ad14a1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/import.php @@ -0,0 +1,58 @@ +import($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Import_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php new file mode 100644 index 000000000000..6ee9257924c0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/insert.php @@ -0,0 +1,57 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php new file mode 100644 index 000000000000..03b89adf9d92 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php new file mode 100644 index 000000000000..d0497d3b2482 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/list_server_cas.php @@ -0,0 +1,61 @@ +listServerCas($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_ListServerCas_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php new file mode 100644 index 000000000000..fadfac70c04c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/patch.php @@ -0,0 +1,58 @@ +patch($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php new file mode 100644 index 000000000000..77a2c96ddcf1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php @@ -0,0 +1,57 @@ +performDiskShrink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_PerformDiskShrink_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php new file mode 100644 index 000000000000..ab955063415c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/promote_replica.php @@ -0,0 +1,58 @@ +promoteReplica($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_PromoteReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php new file mode 100644 index 000000000000..a4175c69217c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reencrypt.php @@ -0,0 +1,57 @@ +reencrypt($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Reencrypt_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php new file mode 100644 index 000000000000..9795d90041e8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php @@ -0,0 +1,76 @@ +setInstance($instance) + ->setProject($project); + + // Call the API and handle any network failures. + try { + /** @var SqlInstancesReleaseSsrsLeaseResponse $response */ + $response = $sqlInstancesServiceClient->releaseSsrsLease($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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + release_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1_generated_SqlInstancesService_ReleaseSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php new file mode 100644 index 000000000000..43a7a8a7b2f8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php @@ -0,0 +1,57 @@ +rescheduleMaintenance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php new file mode 100644 index 000000000000..6d249f20d66c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_replica_size.php @@ -0,0 +1,57 @@ +resetReplicaSize($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_ResetReplicaSize_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php new file mode 100644 index 000000000000..2b70c2126902 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/reset_ssl_config.php @@ -0,0 +1,58 @@ +resetSslConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_ResetSslConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php new file mode 100644 index 000000000000..d633b1d763a7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restart.php @@ -0,0 +1,57 @@ +restart($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Restart_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php new file mode 100644 index 000000000000..ab1ba29f1674 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/restore_backup.php @@ -0,0 +1,58 @@ +restoreBackup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_RestoreBackup_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php new file mode 100644 index 000000000000..143288df84f4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/rotate_server_ca.php @@ -0,0 +1,58 @@ +rotateServerCa($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_RotateServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php new file mode 100644 index 000000000000..9fc1ced4b130 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_external_sync.php @@ -0,0 +1,57 @@ +startExternalSync($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_StartExternalSync_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php new file mode 100644 index 000000000000..f97637c106f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/start_replica.php @@ -0,0 +1,57 @@ +startReplica($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_StartReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php new file mode 100644 index 000000000000..4b12bda8ef2c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/stop_replica.php @@ -0,0 +1,57 @@ +stopReplica($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_StopReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php new file mode 100644 index 000000000000..d8bd94cda419 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/switchover.php @@ -0,0 +1,57 @@ +switchover($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Switchover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php new file mode 100644 index 000000000000..0e6f130dc788 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/truncate_log.php @@ -0,0 +1,58 @@ +truncateLog($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_TruncateLog_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php new file mode 100644 index 000000000000..8df4adfa6f43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/update.php @@ -0,0 +1,58 @@ +update($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php new file mode 100644 index 000000000000..98e058a44c75 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php @@ -0,0 +1,57 @@ +verifyExternalSyncSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlInstancesService_VerifyExternalSyncSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php new file mode 100644 index 000000000000..3666a907132b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/cancel.php @@ -0,0 +1,55 @@ +cancel($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlOperationsService_Cancel_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php new file mode 100644 index 000000000000..52eb3c62d29e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlOperationsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php new file mode 100644 index 000000000000..0beed7105897 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlOperationsServiceClient/list.php @@ -0,0 +1,58 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlOperationsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php new file mode 100644 index 000000000000..0d6646e07dcc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/delete.php @@ -0,0 +1,58 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php new file mode 100644 index 000000000000..3f462a607ecd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/get.php @@ -0,0 +1,59 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php new file mode 100644 index 000000000000..092fb4ef8c79 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/insert.php @@ -0,0 +1,59 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php new file mode 100644 index 000000000000..4e69956a2289 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlSslCertsServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlSslCertsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php new file mode 100644 index 000000000000..e2d320dddaa3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlTiersServiceClient/list.php @@ -0,0 +1,59 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlTiersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php new file mode 100644 index 000000000000..0dcccbd25a60 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/delete.php @@ -0,0 +1,57 @@ +delete($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php new file mode 100644 index 000000000000..b1f9784cbc43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/get.php @@ -0,0 +1,57 @@ +get($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php new file mode 100644 index 000000000000..4c09243fc801 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/insert.php @@ -0,0 +1,57 @@ +insert($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php new file mode 100644 index 000000000000..90925d6bc614 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/list.php @@ -0,0 +1,57 @@ +list($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php new file mode 100644 index 000000000000..8c2584251ae9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/samples/V1/SqlUsersServiceClient/update.php @@ -0,0 +1,57 @@ +update($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1_generated_SqlUsersService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php new file mode 100644 index 000000000000..6dac880c0a7d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlAvailableDatabaseVersionsServiceClient.php @@ -0,0 +1,144 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_available_database_versions_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_available_database_versions_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php new file mode 100644 index 000000000000..18245ffda299 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlBackupRunsServiceClient.php @@ -0,0 +1,278 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_backup_runs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Deletes the backup taken by a backup run. + * + * The async variant is {@see SqlBackupRunsServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/delete.php + * + * @param SqlBackupRunsDeleteRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(SqlBackupRunsDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a backup run. + * + * The async variant is {@see SqlBackupRunsServiceClient::getAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/get.php + * + * @param SqlBackupRunsGetRequest $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 BackupRun + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlBackupRunsGetRequest $request, array $callOptions = []): BackupRun + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates a new backup run on demand. + * + * The async variant is {@see SqlBackupRunsServiceClient::insertAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/insert.php + * + * @param SqlBackupRunsInsertRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(SqlBackupRunsInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists all backup runs associated with the project or a given instance + * and configuration in the reverse chronological order of the backup + * initiation time. + * + * The async variant is {@see SqlBackupRunsServiceClient::listAsync()} . + * + * @example samples/V1/SqlBackupRunsServiceClient/list.php + * + * @param SqlBackupRunsListRequest $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 BackupRunsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlBackupRunsListRequest $request, array $callOptions = []): BackupRunsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php new file mode 100644 index 000000000000..f12ce1affd24 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlConnectServiceClient.php @@ -0,0 +1,223 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_connect_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_connect_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_connect_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_connect_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Generates a short-lived X509 certificate containing the provided public key + * and signed by a private key specific to the target instance. Users may use + * the certificate to authenticate as themselves when connecting to the + * database. + * + * The async variant is + * {@see SqlConnectServiceClient::generateEphemeralCertAsync()} . + * + * @example samples/V1/SqlConnectServiceClient/generate_ephemeral_cert.php + * + * @param GenerateEphemeralCertRequest $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 GenerateEphemeralCertResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateEphemeralCert(GenerateEphemeralCertRequest $request, array $callOptions = []): GenerateEphemeralCertResponse + { + return $this->startApiCall('GenerateEphemeralCert', $request, $callOptions)->wait(); + } + + /** + * Retrieves connect settings about a Cloud SQL instance. + * + * The async variant is {@see SqlConnectServiceClient::getConnectSettingsAsync()} . + * + * @example samples/V1/SqlConnectServiceClient/get_connect_settings.php + * + * @param GetConnectSettingsRequest $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 ConnectSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnectSettings(GetConnectSettingsRequest $request, array $callOptions = []): ConnectSettings + { + return $this->startApiCall('GetConnectSettings', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php new file mode 100644 index 000000000000..30e27179fc91 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlDatabasesServiceClient.php @@ -0,0 +1,337 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_databases_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_databases_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_databases_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_databases_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Deletes a database from a Cloud SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/delete.php + * + * @param SqlDatabasesDeleteRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(SqlDatabasesDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a database inside a Cloud + * SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::getAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/get.php + * + * @param SqlDatabasesGetRequest $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 Database + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlDatabasesGetRequest $request, array $callOptions = []): Database + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Inserts a resource containing information about a database inside a Cloud + * SQL instance. + * + * **Note:** You can't modify the default character set and collation. + * + * The async variant is {@see SqlDatabasesServiceClient::insertAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/insert.php + * + * @param SqlDatabasesInsertRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(SqlDatabasesInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists databases in the specified Cloud SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::listAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/list.php + * + * @param SqlDatabasesListRequest $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 DatabasesListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlDatabasesListRequest $request, array $callOptions = []): DatabasesListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Partially updates a resource containing information about a database inside + * a Cloud SQL instance. This method supports patch semantics. + * + * The async variant is {@see SqlDatabasesServiceClient::patchAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/patch.php + * + * @param SqlDatabasesUpdateRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function patch(SqlDatabasesUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Patch', $request, $callOptions)->wait(); + } + + /** + * Updates a resource containing information about a database inside a Cloud + * SQL instance. + * + * The async variant is {@see SqlDatabasesServiceClient::updateAsync()} . + * + * @example samples/V1/SqlDatabasesServiceClient/update.php + * + * @param SqlDatabasesUpdateRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function update(SqlDatabasesUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php new file mode 100644 index 000000000000..8c66b8e93d57 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlEventsServiceClient.php @@ -0,0 +1,144 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_events_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_events_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_events_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_events_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php new file mode 100644 index 000000000000..6b2f951b8d37 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlFlagsServiceClient.php @@ -0,0 +1,190 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_flags_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_flags_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_flags_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_flags_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Lists all available database flags for Cloud SQL instances. + * + * The async variant is {@see SqlFlagsServiceClient::listAsync()} . + * + * @example samples/V1/SqlFlagsServiceClient/list.php + * + * @param SqlFlagsListRequest $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 FlagsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlFlagsListRequest $request, array $callOptions = []): FlagsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php new file mode 100644 index 000000000000..c6372946e40a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlIamPoliciesServiceClient.php @@ -0,0 +1,143 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_iam_policies_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php new file mode 100644 index 000000000000..b14a6ad7fc16 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstanceNamesServiceClient.php @@ -0,0 +1,143 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_instance_names_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_instance_names_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php new file mode 100644 index 000000000000..182379edcd32 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlInstancesServiceClient.php @@ -0,0 +1,1159 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_instances_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instances_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instances_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_instances_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * The async variant is {@see SqlInstancesServiceClient::acquireSsrsLeaseAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php + * + * @param SqlInstancesAcquireSsrsLeaseRequest $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 SqlInstancesAcquireSsrsLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function acquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesAcquireSsrsLeaseResponse + { + return $this->startApiCall('AcquireSsrsLease', $request, $callOptions)->wait(); + } + + /** + * Adds a new trusted Certificate Authority (CA) version for the specified + * instance. Required to prepare for a certificate rotation. If a CA version + * was previously added but never used in a certificate rotation, this + * operation replaces that version. There cannot be more than one CA version + * waiting to be rotated in. + * + * The async variant is {@see SqlInstancesServiceClient::addServerCaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/add_server_ca.php + * + * @param SqlInstancesAddServerCaRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function addServerCa(SqlInstancesAddServerCaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('AddServerCa', $request, $callOptions)->wait(); + } + + /** + * Creates a Cloud SQL instance as a clone of the source instance. Using this + * operation might cause your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::cloneAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/clone.php + * + * @param SqlInstancesCloneRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function clone(SqlInstancesCloneRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Clone', $request, $callOptions)->wait(); + } + + /** + * Generates a short-lived X509 certificate containing the provided public key + * and signed by a private key specific to the target instance. Users may use + * the certificate to authenticate as themselves when connecting to the + * database. + * + * The async variant is {@see SqlInstancesServiceClient::createEphemeralAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/create_ephemeral.php + * + * @param SqlInstancesCreateEphemeralCertRequest $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 SslCert + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEphemeral(SqlInstancesCreateEphemeralCertRequest $request, array $callOptions = []): SslCert + { + return $this->startApiCall('CreateEphemeral', $request, $callOptions)->wait(); + } + + /** + * Deletes a Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/delete.php + * + * @param SqlInstancesDeleteRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(SqlInstancesDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Demotes an existing standalone instance to be a Cloud SQL read replica + * for an external database server. + * + * The async variant is {@see SqlInstancesServiceClient::demoteAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/demote.php + * + * @param SqlInstancesDemoteRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function demote(SqlInstancesDemoteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Demote', $request, $callOptions)->wait(); + } + + /** + * Demotes the stand-alone instance to be a Cloud SQL read replica for an + * external database server. + * + * The async variant is {@see SqlInstancesServiceClient::demoteMasterAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/demote_master.php + * + * @param SqlInstancesDemoteMasterRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function demoteMaster(SqlInstancesDemoteMasterRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('DemoteMaster', $request, $callOptions)->wait(); + } + + /** + * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL + * dump or CSV file. + * + * The async variant is {@see SqlInstancesServiceClient::exportAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/export.php + * + * @param SqlInstancesExportRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function export(SqlInstancesExportRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Export', $request, $callOptions)->wait(); + } + + /** + * Initiates a manual failover of a high availability (HA) primary instance + * to a standby instance, which becomes the primary instance. Users are + * then rerouted to the new primary. For more information, see the + * [Overview of high + * availability](https://cloud.google.com/sql/docs/mysql/high-availability) + * page in the Cloud SQL documentation. + * If using Legacy HA (MySQL only), this causes the instance to failover to + * its failover replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::failoverAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/failover.php + * + * @param SqlInstancesFailoverRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function failover(SqlInstancesFailoverRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Failover', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::getAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/get.php + * + * @param SqlInstancesGetRequest $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 DatabaseInstance + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlInstancesGetRequest $request, array $callOptions = []): DatabaseInstance + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Get Disk Shrink Config for a given instance. + * + * The async variant is + * {@see SqlInstancesServiceClient::getDiskShrinkConfigAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/get_disk_shrink_config.php + * + * @param SqlInstancesGetDiskShrinkConfigRequest $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 SqlInstancesGetDiskShrinkConfigResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDiskShrinkConfig(SqlInstancesGetDiskShrinkConfigRequest $request, array $callOptions = []): SqlInstancesGetDiskShrinkConfigResponse + { + return $this->startApiCall('GetDiskShrinkConfig', $request, $callOptions)->wait(); + } + + /** + * Get Latest Recovery Time for a given instance. + * + * The async variant is + * {@see SqlInstancesServiceClient::getLatestRecoveryTimeAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/get_latest_recovery_time.php + * + * @param SqlInstancesGetLatestRecoveryTimeRequest $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 SqlInstancesGetLatestRecoveryTimeResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLatestRecoveryTime(SqlInstancesGetLatestRecoveryTimeRequest $request, array $callOptions = []): SqlInstancesGetLatestRecoveryTimeResponse + { + return $this->startApiCall('GetLatestRecoveryTime', $request, $callOptions)->wait(); + } + + /** + * Imports data into a Cloud SQL instance from a SQL dump or CSV file in + * Cloud Storage. + * + * The async variant is {@see SqlInstancesServiceClient::importAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/import.php + * + * @param SqlInstancesImportRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function import(SqlInstancesImportRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Import', $request, $callOptions)->wait(); + } + + /** + * Creates a new Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::insertAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/insert.php + * + * @param SqlInstancesInsertRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(SqlInstancesInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists instances under a given project. + * + * The async variant is {@see SqlInstancesServiceClient::listAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/list.php + * + * @param SqlInstancesListRequest $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 InstancesListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlInstancesListRequest $request, array $callOptions = []): InstancesListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Lists all of the trusted Certificate Authorities (CAs) for the specified + * instance. There can be up to three CAs listed: the CA that was used to sign + * the certificate that is currently in use, a CA that has been added but not + * yet used to sign a certificate, and a CA used to sign a certificate that + * has previously rotated out. + * + * The async variant is {@see SqlInstancesServiceClient::listServerCasAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/list_server_cas.php + * + * @param SqlInstancesListServerCasRequest $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 InstancesListServerCasResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServerCas(SqlInstancesListServerCasRequest $request, array $callOptions = []): InstancesListServerCasResponse + { + return $this->startApiCall('ListServerCas', $request, $callOptions)->wait(); + } + + /** + * Partially updates settings of a Cloud SQL instance by merging the request + * with the current configuration. This method supports patch semantics. + * + * The async variant is {@see SqlInstancesServiceClient::patchAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/patch.php + * + * @param SqlInstancesPatchRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function patch(SqlInstancesPatchRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Patch', $request, $callOptions)->wait(); + } + + /** + * Perform Disk Shrink on primary instance. + * + * The async variant is {@see SqlInstancesServiceClient::performDiskShrinkAsync()} + * . + * + * @example samples/V1/SqlInstancesServiceClient/perform_disk_shrink.php + * + * @param SqlInstancesPerformDiskShrinkRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function performDiskShrink(SqlInstancesPerformDiskShrinkRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('PerformDiskShrink', $request, $callOptions)->wait(); + } + + /** + * Promotes the read replica instance to be a stand-alone Cloud SQL instance. + * Using this operation might cause your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::promoteReplicaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/promote_replica.php + * + * @param SqlInstancesPromoteReplicaRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function promoteReplica(SqlInstancesPromoteReplicaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('PromoteReplica', $request, $callOptions)->wait(); + } + + /** + * Reencrypt CMEK instance with latest key version. + * + * The async variant is {@see SqlInstancesServiceClient::reencryptAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reencrypt.php + * + * @param SqlInstancesReencryptRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function reencrypt(SqlInstancesReencryptRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Reencrypt', $request, $callOptions)->wait(); + } + + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * The async variant is {@see SqlInstancesServiceClient::releaseSsrsLeaseAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php + * + * @param SqlInstancesReleaseSsrsLeaseRequest $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 SqlInstancesReleaseSsrsLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function releaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesReleaseSsrsLeaseResponse + { + return $this->startApiCall('ReleaseSsrsLease', $request, $callOptions)->wait(); + } + + /** + * Reschedules the maintenance on the given instance. + * + * The async variant is + * {@see SqlInstancesServiceClient::rescheduleMaintenanceAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reschedule_maintenance.php + * + * @param SqlInstancesRescheduleMaintenanceRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function rescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); + } + + /** + * Reset Replica Size to primary instance disk size. + * + * The async variant is {@see SqlInstancesServiceClient::resetReplicaSizeAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reset_replica_size.php + * + * @param SqlInstancesResetReplicaSizeRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetReplicaSize(SqlInstancesResetReplicaSizeRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('ResetReplicaSize', $request, $callOptions)->wait(); + } + + /** + * Deletes all client certificates and generates a new server SSL certificate + * for the instance. + * + * The async variant is {@see SqlInstancesServiceClient::resetSslConfigAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/reset_ssl_config.php + * + * @param SqlInstancesResetSslConfigRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetSslConfig(SqlInstancesResetSslConfigRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('ResetSslConfig', $request, $callOptions)->wait(); + } + + /** + * Restarts a Cloud SQL instance. + * + * The async variant is {@see SqlInstancesServiceClient::restartAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/restart.php + * + * @param SqlInstancesRestartRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function restart(SqlInstancesRestartRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Restart', $request, $callOptions)->wait(); + } + + /** + * Restores a backup of a Cloud SQL instance. Using this operation might cause + * your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::restoreBackupAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/restore_backup.php + * + * @param SqlInstancesRestoreBackupRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function restoreBackup(SqlInstancesRestoreBackupRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('RestoreBackup', $request, $callOptions)->wait(); + } + + /** + * Rotates the server certificate to one signed by the Certificate Authority + * (CA) version previously added with the addServerCA method. + * + * The async variant is {@see SqlInstancesServiceClient::rotateServerCaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/rotate_server_ca.php + * + * @param SqlInstancesRotateServerCaRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function rotateServerCa(SqlInstancesRotateServerCaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('RotateServerCa', $request, $callOptions)->wait(); + } + + /** + * Start External primary instance migration. + * + * The async variant is {@see SqlInstancesServiceClient::startExternalSyncAsync()} + * . + * + * @example samples/V1/SqlInstancesServiceClient/start_external_sync.php + * + * @param SqlInstancesStartExternalSyncRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function startExternalSync(SqlInstancesStartExternalSyncRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('StartExternalSync', $request, $callOptions)->wait(); + } + + /** + * Starts the replication in the read replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::startReplicaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/start_replica.php + * + * @param SqlInstancesStartReplicaRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function startReplica(SqlInstancesStartReplicaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('StartReplica', $request, $callOptions)->wait(); + } + + /** + * Stops the replication in the read replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::stopReplicaAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/stop_replica.php + * + * @param SqlInstancesStopReplicaRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopReplica(SqlInstancesStopReplicaRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('StopReplica', $request, $callOptions)->wait(); + } + + /** + * Switches over from the primary instance to the replica instance. + * + * The async variant is {@see SqlInstancesServiceClient::switchoverAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/switchover.php + * + * @param SqlInstancesSwitchoverRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function switchover(SqlInstancesSwitchoverRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Switchover', $request, $callOptions)->wait(); + } + + /** + * Truncate MySQL general and slow query log tables + * MySQL only. + * + * The async variant is {@see SqlInstancesServiceClient::truncateLogAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/truncate_log.php + * + * @param SqlInstancesTruncateLogRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function truncateLog(SqlInstancesTruncateLogRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('TruncateLog', $request, $callOptions)->wait(); + } + + /** + * Updates settings of a Cloud SQL instance. Using this operation might cause + * your instance to restart. + * + * The async variant is {@see SqlInstancesServiceClient::updateAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/update.php + * + * @param SqlInstancesUpdateRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function update(SqlInstancesUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } + + /** + * Verify External primary instance external sync settings. + * + * The async variant is + * {@see SqlInstancesServiceClient::verifyExternalSyncSettingsAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/verify_external_sync_settings.php + * + * @param SqlInstancesVerifyExternalSyncSettingsRequest $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 SqlInstancesVerifyExternalSyncSettingsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function verifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest $request, array $callOptions = []): SqlInstancesVerifyExternalSyncSettingsResponse + { + return $this->startApiCall('VerifyExternalSyncSettings', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php new file mode 100644 index 000000000000..076b9c0fbbd4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlOperationsServiceClient.php @@ -0,0 +1,246 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_operations_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_operations_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_operations_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_operations_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Cancels an instance operation that has been performed on an instance. + * + * The async variant is {@see SqlOperationsServiceClient::cancelAsync()} . + * + * @example samples/V1/SqlOperationsServiceClient/cancel.php + * + * @param SqlOperationsCancelRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancel(SqlOperationsCancelRequest $request, array $callOptions = []): void + { + $this->startApiCall('Cancel', $request, $callOptions)->wait(); + } + + /** + * Retrieves an instance operation that has been performed on an instance. + * + * The async variant is {@see SqlOperationsServiceClient::getAsync()} . + * + * @example samples/V1/SqlOperationsServiceClient/get.php + * + * @param SqlOperationsGetRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlOperationsGetRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Lists all instance operations that have been performed on the given Cloud + * SQL instance in the reverse chronological order of the start time. + * + * The async variant is {@see SqlOperationsServiceClient::listAsync()} . + * + * @example samples/V1/SqlOperationsServiceClient/list.php + * + * @param SqlOperationsListRequest $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 OperationsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlOperationsListRequest $request, array $callOptions = []): OperationsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php new file mode 100644 index 000000000000..242dbb55bbc9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlRegionsServiceClient.php @@ -0,0 +1,144 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_regions_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_regions_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_regions_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_regions_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php new file mode 100644 index 000000000000..a9773610c7b4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlSslCertsServiceClient.php @@ -0,0 +1,282 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_ssl_certs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Deletes the SSL certificate. For First Generation instances, the + * certificate remains valid until the instance is restarted. + * + * The async variant is {@see SqlSslCertsServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/delete.php + * + * @param SqlSslCertsDeleteRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(SqlSslCertsDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a particular SSL certificate. Does not include the private key + * (required for usage). The private key must be saved from the response to + * initial creation. + * + * The async variant is {@see SqlSslCertsServiceClient::getAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/get.php + * + * @param SqlSslCertsGetRequest $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 SslCert + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlSslCertsGetRequest $request, array $callOptions = []): SslCert + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates an SSL certificate and returns it along with the private key and + * server certificate authority. The new certificate will not be usable until + * the instance is restarted. + * + * The async variant is {@see SqlSslCertsServiceClient::insertAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/insert.php + * + * @param SqlSslCertsInsertRequest $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 SslCertsInsertResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(SqlSslCertsInsertRequest $request, array $callOptions = []): SslCertsInsertResponse + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists all of the current SSL certificates for the instance. + * + * The async variant is {@see SqlSslCertsServiceClient::listAsync()} . + * + * @example samples/V1/SqlSslCertsServiceClient/list.php + * + * @param SqlSslCertsListRequest $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 SslCertsListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlSslCertsListRequest $request, array $callOptions = []): SslCertsListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php new file mode 100644 index 000000000000..0b502852ef6f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlTiersServiceClient.php @@ -0,0 +1,192 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_tiers_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_tiers_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_tiers_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_tiers_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Lists all available machine types (tiers) for Cloud SQL, for example, + * `db-custom-1-3840`. For more information, see + * https://cloud.google.com/sql/pricing. + * + * The async variant is {@see SqlTiersServiceClient::listAsync()} . + * + * @example samples/V1/SqlTiersServiceClient/list.php + * + * @param SqlTiersListRequest $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 TiersListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlTiersListRequest $request, array $callOptions = []): TiersListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php new file mode 100644 index 000000000000..52302bb14f97 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/Client/SqlUsersServiceClient.php @@ -0,0 +1,304 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_users_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_users_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_users_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_users_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Deletes a user from a Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::deleteAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/delete.php + * + * @param SqlUsersDeleteRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(SqlUsersDeleteRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Retrieves a resource containing information about a user. + * + * The async variant is {@see SqlUsersServiceClient::getAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/get.php + * + * @param SqlUsersGetRequest $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 User + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(SqlUsersGetRequest $request, array $callOptions = []): User + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates a new user in a Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::insertAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/insert.php + * + * @param SqlUsersInsertRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(SqlUsersInsertRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Lists users in the specified Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::listAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/list.php + * + * @param SqlUsersListRequest $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 UsersListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(SqlUsersListRequest $request, array $callOptions = []): UsersListResponse + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Updates an existing user in a Cloud SQL instance. + * + * The async variant is {@see SqlUsersServiceClient::updateAsync()} . + * + * @example samples/V1/SqlUsersServiceClient/update.php + * + * @param SqlUsersUpdateRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function update(SqlUsersUpdateRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..a32b84c89910 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/gapic_metadata.json @@ -0,0 +1,425 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.sql.v1", + "libraryPackage": "Google\\Cloud\\Sql\\V1", + "services": { + "SqlAvailableDatabaseVersionsService": { + "clients": { + "grpc": { + "libraryClient": "SqlAvailableDatabaseVersionsServiceGapicClient" + } + } + }, + "SqlBackupRunsService": { + "clients": { + "grpc": { + "libraryClient": "SqlBackupRunsServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlConnectService": { + "clients": { + "grpc": { + "libraryClient": "SqlConnectServiceGapicClient", + "rpcs": { + "GenerateEphemeralCert": { + "methods": [ + "generateEphemeralCert" + ] + }, + "GetConnectSettings": { + "methods": [ + "getConnectSettings" + ] + } + } + } + } + }, + "SqlDatabasesService": { + "clients": { + "grpc": { + "libraryClient": "SqlDatabasesServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + }, + "SqlEventsService": { + "clients": { + "grpc": { + "libraryClient": "SqlEventsServiceGapicClient" + } + } + }, + "SqlFlagsService": { + "clients": { + "grpc": { + "libraryClient": "SqlFlagsServiceGapicClient", + "rpcs": { + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlIamPoliciesService": { + "clients": { + "grpc": { + "libraryClient": "SqlIamPoliciesServiceGapicClient" + } + } + }, + "SqlInstanceNamesService": { + "clients": { + "grpc": { + "libraryClient": "SqlInstanceNamesServiceGapicClient" + } + } + }, + "SqlInstancesService": { + "clients": { + "grpc": { + "libraryClient": "SqlInstancesServiceGapicClient", + "rpcs": { + "AcquireSsrsLease": { + "methods": [ + "acquireSsrsLease" + ] + }, + "AddServerCa": { + "methods": [ + "addServerCa" + ] + }, + "Clone": { + "methods": [ + "clone" + ] + }, + "CreateEphemeral": { + "methods": [ + "createEphemeral" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Demote": { + "methods": [ + "demote" + ] + }, + "DemoteMaster": { + "methods": [ + "demoteMaster" + ] + }, + "Export": { + "methods": [ + "export" + ] + }, + "Failover": { + "methods": [ + "failover" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "GetDiskShrinkConfig": { + "methods": [ + "getDiskShrinkConfig" + ] + }, + "GetLatestRecoveryTime": { + "methods": [ + "getLatestRecoveryTime" + ] + }, + "Import": { + "methods": [ + "import" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "ListServerCas": { + "methods": [ + "listServerCas" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + }, + "PerformDiskShrink": { + "methods": [ + "performDiskShrink" + ] + }, + "PromoteReplica": { + "methods": [ + "promoteReplica" + ] + }, + "Reencrypt": { + "methods": [ + "reencrypt" + ] + }, + "ReleaseSsrsLease": { + "methods": [ + "releaseSsrsLease" + ] + }, + "RescheduleMaintenance": { + "methods": [ + "rescheduleMaintenance" + ] + }, + "ResetReplicaSize": { + "methods": [ + "resetReplicaSize" + ] + }, + "ResetSslConfig": { + "methods": [ + "resetSslConfig" + ] + }, + "Restart": { + "methods": [ + "restart" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "RotateServerCa": { + "methods": [ + "rotateServerCa" + ] + }, + "StartExternalSync": { + "methods": [ + "startExternalSync" + ] + }, + "StartReplica": { + "methods": [ + "startReplica" + ] + }, + "StopReplica": { + "methods": [ + "stopReplica" + ] + }, + "Switchover": { + "methods": [ + "switchover" + ] + }, + "TruncateLog": { + "methods": [ + "truncateLog" + ] + }, + "Update": { + "methods": [ + "update" + ] + }, + "VerifyExternalSyncSettings": { + "methods": [ + "verifyExternalSyncSettings" + ] + } + } + } + } + }, + "SqlOperationsService": { + "clients": { + "grpc": { + "libraryClient": "SqlOperationsServiceGapicClient", + "rpcs": { + "Cancel": { + "methods": [ + "cancel" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlRegionsService": { + "clients": { + "grpc": { + "libraryClient": "SqlRegionsServiceGapicClient" + } + } + }, + "SqlSslCertsService": { + "clients": { + "grpc": { + "libraryClient": "SqlSslCertsServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlTiersService": { + "clients": { + "grpc": { + "libraryClient": "SqlTiersServiceGapicClient", + "rpcs": { + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "SqlUsersService": { + "clients": { + "grpc": { + "libraryClient": "SqlUsersServiceGapicClient", + "rpcs": { + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json new file mode 100644 index 000000000000..67533dc18e0f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlAvailableDatabaseVersionsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php new file mode 100644 index 000000000000..356e7981b252 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlAvailableDatabaseVersionsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_available_database_versions_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json new file mode 100644 index 000000000000..b69646a9f35d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlBackupRunsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php new file mode 100644 index 000000000000..afda4d34224e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_descriptor_config.php @@ -0,0 +1,112 @@ + [ + 'google.cloud.sql.v1.SqlBackupRunsService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'id', + 'fieldAccessors' => [ + 'getId', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\BackupRun', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'id', + 'fieldAccessors' => [ + 'getId', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\BackupRunsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php new file mode 100644 index 000000000000..88a3920f7733 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_backup_runs_service_rest_client_config.php @@ -0,0 +1,104 @@ + [ + 'google.cloud.sql.v1.SqlBackupRunsService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns/{id}', + 'placeholders' => [ + 'id' => [ + 'getters' => [ + 'getId', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns/{id}', + 'placeholders' => [ + 'id' => [ + 'getters' => [ + 'getId', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/backupRuns', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json new file mode 100644 index 000000000000..4c1986cfb3a9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlConnectService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "GenerateEphemeralCert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetConnectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php new file mode 100644 index 000000000000..24ec469afcb7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_descriptor_config.php @@ -0,0 +1,64 @@ + [ + 'google.cloud.sql.v1.SqlConnectService' => [ + 'GenerateEphemeralCert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\GenerateEphemeralCertResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'GetConnectSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\ConnectSettings', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php new file mode 100644 index 000000000000..b68bacc8b395 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_connect_service_rest_client_config.php @@ -0,0 +1,62 @@ + [ + 'google.cloud.sql.v1.SqlConnectService' => [ + 'GenerateEphemeralCert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}:generateEphemeralCert', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetConnectSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/connectSettings', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json new file mode 100644 index 000000000000..6542ee505199 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlDatabasesService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Patch": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php new file mode 100644 index 000000000000..5484e5243370 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_descriptor_config.php @@ -0,0 +1,160 @@ + [ + 'google.cloud.sql.v1.SqlDatabasesService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Database', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\DatabasesListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Patch' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Update' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php new file mode 100644 index 000000000000..92ed62735309 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_databases_service_rest_client_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.sql.v1.SqlDatabasesService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'body' => 'body', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/databases/{database}', + 'body' => 'body', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json new file mode 100644 index 000000000000..cb52d4e16a1f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_client_config.json @@ -0,0 +1,31 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlEventsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php new file mode 100644 index 000000000000..55d525ef6df8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlEventsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_events_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json new file mode 100644 index 000000000000..ae3b5f2ee3d0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlFlagsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php new file mode 100644 index 000000000000..34f76073b652 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_descriptor_config.php @@ -0,0 +1,32 @@ + [ + 'google.cloud.sql.v1.SqlFlagsService' => [ + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\FlagsListResponse', + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php new file mode 100644 index 000000000000..caa3c0daf149 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_flags_service_rest_client_config.php @@ -0,0 +1,33 @@ + [ + 'google.cloud.sql.v1.SqlFlagsService' => [ + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/flags', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json new file mode 100644 index 000000000000..c14bc6174db0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlIamPoliciesService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php new file mode 100644 index 000000000000..45c8076dd07f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlIamPoliciesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_iam_policies_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json new file mode 100644 index 000000000000..a6173faa203a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlInstanceNamesService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php new file mode 100644 index 000000000000..0c94603c1c35 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlInstanceNamesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instance_names_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json new file mode 100644 index 000000000000..acab843eb19f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_client_config.json @@ -0,0 +1,202 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlInstancesService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AcquireSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "AddServerCa": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Clone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateEphemeral": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Demote": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DemoteMaster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Export": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Failover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDiskShrinkConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLatestRecoveryTime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Import": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListServerCas": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Patch": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PerformDiskShrink": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PromoteReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Reencrypt": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReleaseSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RescheduleMaintenance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetReplicaSize": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetSslConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Restart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RotateServerCa": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartExternalSync": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Switchover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TruncateLog": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "VerifyExternalSyncSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php new file mode 100644 index 000000000000..8a91a4186997 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_descriptor_config.php @@ -0,0 +1,628 @@ + [ + 'google.cloud.sql.v1.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'AddServerCa' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Clone' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'CreateEphemeral' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCert', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Demote' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'DemoteMaster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Export' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Failover' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\DatabaseInstance', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'GetDiskShrinkConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesGetDiskShrinkConfigResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'GetLatestRecoveryTime' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesGetLatestRecoveryTimeResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Import' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\InstancesListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'ListServerCas' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\InstancesListServerCasResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Patch' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'PerformDiskShrink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'PromoteReplica' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Reencrypt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'ReleaseSsrsLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'ResetReplicaSize' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'ResetSslConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Restart' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'RestoreBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'RotateServerCa' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'StartExternalSync' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'StartReplica' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'StopReplica' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Switchover' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'TruncateLog' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Update' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'VerifyExternalSyncSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php new file mode 100644 index 000000000000..29c60fc1eb5c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_instances_service_rest_client_config.php @@ -0,0 +1,583 @@ + [ + 'google.cloud.sql.v1.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/acquireSsrsLease', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'AddServerCa' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/addServerCa', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Clone' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/clone', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'CreateEphemeral' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/createEphemeral', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Demote' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/demote', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'DemoteMaster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/demoteMaster', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Export' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/export', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Failover' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/failover', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetDiskShrinkConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/getDiskShrinkConfig', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetLatestRecoveryTime' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/getLatestRecoveryTime', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Import' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/import', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances', + 'body' => 'body', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ListServerCas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/listServerCas', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'PerformDiskShrink' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/performDiskShrink', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'PromoteReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/promoteReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Reencrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/reencrypt', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ReleaseSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/releaseSsrsLease', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rescheduleMaintenance', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ResetReplicaSize' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/resetReplicaSize', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ResetSslConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/resetSslConfig', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Restart' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/restart', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RestoreBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/restoreBackup', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RotateServerCa' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rotateServerCa', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StartExternalSync' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/startExternalSync', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StartReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/startReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StopReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/stopReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Switchover' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/switchover', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'TruncateLog' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/truncateLog', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'VerifyExternalSyncSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json new file mode 100644 index 000000000000..5ce164fb9ef6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_client_config.json @@ -0,0 +1,47 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlOperationsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Cancel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php new file mode 100644 index 000000000000..c10561a60717 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_descriptor_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.sql.v1.SqlOperationsService' => [ + 'Cancel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'operation', + 'fieldAccessors' => [ + 'getOperation', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'operation', + 'fieldAccessors' => [ + 'getOperation', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\OperationsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php new file mode 100644 index 000000000000..1f90139216f3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_operations_service_rest_client_config.php @@ -0,0 +1,72 @@ + [ + 'google.cloud.sql.v1.SqlOperationsService' => [ + 'Cancel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/operations/{operation}/cancel', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json new file mode 100644 index 000000000000..174e56eb3b97 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlRegionsService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php new file mode 100644 index 000000000000..d3311811274a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1.SqlRegionsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_regions_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json new file mode 100644 index 000000000000..46ceaef63718 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlSslCertsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php new file mode 100644 index 000000000000..2fd9e63e4e12 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_descriptor_config.php @@ -0,0 +1,112 @@ + [ + 'google.cloud.sql.v1.SqlSslCertsService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'sha1_fingerprint', + 'fieldAccessors' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCert', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'sha1_fingerprint', + 'fieldAccessors' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCertsInsertResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SslCertsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php new file mode 100644 index 000000000000..293461e0404a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_ssl_certs_service_rest_client_config.php @@ -0,0 +1,104 @@ + [ + 'google.cloud.sql.v1.SqlSslCertsService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'sha1_fingerprint' => [ + 'getters' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'sha1_fingerprint' => [ + 'getters' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/sslCerts', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json new file mode 100644 index 000000000000..5cb74b67df4b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlTiersService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php new file mode 100644 index 000000000000..0b40da39b6bc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_descriptor_config.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.sql.v1.SqlTiersService' => [ + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\TiersListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php new file mode 100644 index 000000000000..e983b43d09d9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_tiers_service_rest_client_config.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.sql.v1.SqlTiersService' => [ + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/tiers', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json new file mode 100644 index 000000000000..b9b8a36e8ce7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.cloud.sql.v1.SqlUsersService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php new file mode 100644 index 000000000000..d998757a81db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_descriptor_config.php @@ -0,0 +1,124 @@ + [ + 'google.cloud.sql.v1.SqlUsersService' => [ + 'Delete' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\User', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'Insert' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\UsersListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'Update' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\Operation', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php new file mode 100644 index 000000000000..1ce8c4a32f35 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/src/V1/resources/sql_users_service_rest_client_config.php @@ -0,0 +1,116 @@ + [ + 'google.cloud.sql.v1.SqlUsersService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users/{name}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/users', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php new file mode 100644 index 000000000000..9715a06bdc6d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlAvailableDatabaseVersionsServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlAvailableDatabaseVersionsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlAvailableDatabaseVersionsServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php new file mode 100644 index 000000000000..21106acc0178 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlBackupRunsServiceClientTest.php @@ -0,0 +1,365 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlBackupRunsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlBackupRunsServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlBackupRunsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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 SqlBackupRunsDeleteRequest(); + try { + $gapicClient->delete($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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $id2 = 3227150; + $description = 'description-1724546052'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $location = 'location1901043637'; + $timeZone = 'timeZone36848094'; + $expectedResponse = new BackupRun(); + $expectedResponse->setKind($kind); + $expectedResponse->setId($id2); + $expectedResponse->setDescription($description); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setLocation($location); + $expectedResponse->setTimeZone($timeZone); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlBackupRunsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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 SqlBackupRunsGetRequest(); + try { + $gapicClient->get($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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlBackupRunsService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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 SqlBackupRunsInsertRequest(); + try { + $gapicClient->insert($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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new BackupRunsListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlBackupRunsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlBackupRunsListRequest(); + try { + $gapicClient->list($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 deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlBackupRunsDeleteRequest(); + $response = $gapicClient->deleteAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlBackupRunsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php new file mode 100644 index 000000000000..7463ad765f89 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlConnectServiceClientTest.php @@ -0,0 +1,202 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlConnectServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlConnectServiceClient($options); + } + + /** @test */ + public function generateEphemeralCertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateEphemeralCertResponse(); + $transport->addResponse($expectedResponse); + $request = new GenerateEphemeralCertRequest(); + $response = $gapicClient->generateEphemeralCert($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.sql.v1.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateEphemeralCertExceptionTest() + { + $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 GenerateEphemeralCertRequest(); + try { + $gapicClient->generateEphemeralCert($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 getConnectSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $region = 'region-934795532'; + $pscEnabled = true; + $dnsName = 'dnsName411992033'; + $expectedResponse = new ConnectSettings(); + $expectedResponse->setKind($kind); + $expectedResponse->setRegion($region); + $expectedResponse->setPscEnabled($pscEnabled); + $expectedResponse->setDnsName($dnsName); + $transport->addResponse($expectedResponse); + $request = new GetConnectSettingsRequest(); + $response = $gapicClient->getConnectSettings($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.sql.v1.SqlConnectService/GetConnectSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectSettingsExceptionTest() + { + $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 GetConnectSettingsRequest(); + try { + $gapicClient->getConnectSettings($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 generateEphemeralCertAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateEphemeralCertResponse(); + $transport->addResponse($expectedResponse); + $request = new GenerateEphemeralCertRequest(); + $response = $gapicClient->generateEphemeralCertAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php new file mode 100644 index 000000000000..217b77521648 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlDatabasesServiceClientTest.php @@ -0,0 +1,502 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlDatabasesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlDatabasesServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlDatabasesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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 SqlDatabasesDeleteRequest(); + try { + $gapicClient->delete($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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $charset = 'charset739074380'; + $collation = 'collation1880293257'; + $etag = 'etag3123477'; + $name = 'name3373707'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $project2 = 'project2-894831476'; + $expectedResponse = new Database(); + $expectedResponse->setKind($kind); + $expectedResponse->setCharset($charset); + $expectedResponse->setCollation($collation); + $expectedResponse->setEtag($etag); + $expectedResponse->setName($name); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setProject($project2); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlDatabasesService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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 SqlDatabasesGetRequest(); + try { + $gapicClient->get($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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlDatabasesService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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 SqlDatabasesInsertRequest(); + try { + $gapicClient->insert($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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new DatabasesListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlDatabasesService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlDatabasesListRequest(); + try { + $gapicClient->list($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 patchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesUpdateRequest(); + $response = $gapicClient->patch($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.sql.v1.SqlDatabasesService/Patch', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $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 SqlDatabasesUpdateRequest(); + try { + $gapicClient->patch($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 updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesUpdateRequest(); + $response = $gapicClient->update($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.sql.v1.SqlDatabasesService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $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 SqlDatabasesUpdateRequest(); + try { + $gapicClient->update($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 deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlDatabasesDeleteRequest(); + $response = $gapicClient->deleteAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlDatabasesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php new file mode 100644 index 000000000000..25ef5a2c273c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlEventsServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlEventsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlEventsServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php new file mode 100644 index 000000000000..3a540339561b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlFlagsServiceClientTest.php @@ -0,0 +1,142 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlFlagsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlFlagsServiceClient($options); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new FlagsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlFlagsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlFlagsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlFlagsListRequest(); + try { + $gapicClient->list($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 listAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new FlagsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlFlagsListRequest(); + $response = $gapicClient->listAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlFlagsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php new file mode 100644 index 000000000000..ecde531e3f3e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlIamPoliciesServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlIamPoliciesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlIamPoliciesServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php new file mode 100644 index 000000000000..64aed46c7dc5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstanceNamesServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlInstanceNamesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlInstanceNamesServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php new file mode 100644 index 000000000000..09956e8eeb12 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php @@ -0,0 +1,2466 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlInstancesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlInstancesServiceClient($options); + } + + /** @test */ + public function acquireSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->acquireSsrsLease($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.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireSsrsLeaseExceptionTest() + { + $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 + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + try { + $gapicClient->acquireSsrsLease($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 addServerCaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesAddServerCaRequest(); + $response = $gapicClient->addServerCa($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.sql.v1.SqlInstancesService/AddServerCa', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addServerCaExceptionTest() + { + $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 SqlInstancesAddServerCaRequest(); + try { + $gapicClient->addServerCa($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 cloneTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesCloneRequest(); + $response = $gapicClient->clone($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.sql.v1.SqlInstancesService/Clone', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cloneExceptionTest() + { + $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 SqlInstancesCloneRequest(); + try { + $gapicClient->clone($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 createEphemeralTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $certSerialNumber = 'certSerialNumber-440611559'; + $cert = 'cert3050020'; + $commonName = 'commonName-1924955041'; + $sha1Fingerprint = 'sha1Fingerprint-1699692374'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new SslCert(); + $expectedResponse->setKind($kind); + $expectedResponse->setCertSerialNumber($certSerialNumber); + $expectedResponse->setCert($cert); + $expectedResponse->setCommonName($commonName); + $expectedResponse->setSha1Fingerprint($sha1Fingerprint); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesCreateEphemeralCertRequest(); + $response = $gapicClient->createEphemeral($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.sql.v1.SqlInstancesService/CreateEphemeral', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEphemeralExceptionTest() + { + $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 SqlInstancesCreateEphemeralCertRequest(); + try { + $gapicClient->createEphemeral($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 deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlInstancesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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 SqlInstancesDeleteRequest(); + try { + $gapicClient->delete($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 demoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesDemoteRequest(); + $bodyDemoteContext = new DemoteContext(); + $demoteContextSourceRepresentativeInstanceName = 'demoteContextSourceRepresentativeInstanceName1566063379'; + $bodyDemoteContext->setSourceRepresentativeInstanceName($demoteContextSourceRepresentativeInstanceName); + $body->setDemoteContext($bodyDemoteContext); + $request = (new SqlInstancesDemoteRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->demote($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.sql.v1.SqlInstancesService/Demote', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteExceptionTest() + { + $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 + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesDemoteRequest(); + $bodyDemoteContext = new DemoteContext(); + $demoteContextSourceRepresentativeInstanceName = 'demoteContextSourceRepresentativeInstanceName1566063379'; + $bodyDemoteContext->setSourceRepresentativeInstanceName($demoteContextSourceRepresentativeInstanceName); + $body->setDemoteContext($bodyDemoteContext); + $request = (new SqlInstancesDemoteRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + try { + $gapicClient->demote($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 demoteMasterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesDemoteMasterRequest(); + $response = $gapicClient->demoteMaster($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.sql.v1.SqlInstancesService/DemoteMaster', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteMasterExceptionTest() + { + $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 SqlInstancesDemoteMasterRequest(); + try { + $gapicClient->demoteMaster($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 exportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesExportRequest(); + $response = $gapicClient->export($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.sql.v1.SqlInstancesService/Export', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportExceptionTest() + { + $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 SqlInstancesExportRequest(); + try { + $gapicClient->export($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 failoverTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesFailoverRequest(); + $response = $gapicClient->failover($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.sql.v1.SqlInstancesService/Failover', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function failoverExceptionTest() + { + $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 SqlInstancesFailoverRequest(); + try { + $gapicClient->failover($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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $etag = 'etag3123477'; + $masterInstanceName = 'masterInstanceName-383886120'; + $project2 = 'project2-894831476'; + $ipv6Address = 'ipv6Address1952176540'; + $serviceAccountEmailAddress = 'serviceAccountEmailAddress303603125'; + $selfLink = 'selfLink-1691268851'; + $connectionName = 'connectionName731664204'; + $name = 'name3373707'; + $region = 'region-934795532'; + $gceZone = 'gceZone-227587294'; + $secondaryGceZone = 'secondaryGceZone826699149'; + $rootPassword = 'rootPassword448743768'; + $databaseInstalledVersion = 'databaseInstalledVersion-1701014705'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $pscServiceAttachmentLink = 'pscServiceAttachmentLink309057421'; + $dnsName = 'dnsName411992033'; + $primaryDnsName = 'primaryDnsName-1306966658'; + $writeEndpoint = 'writeEndpoint-1575656971'; + $expectedResponse = new DatabaseInstance(); + $expectedResponse->setKind($kind); + $expectedResponse->setEtag($etag); + $expectedResponse->setMasterInstanceName($masterInstanceName); + $expectedResponse->setProject($project2); + $expectedResponse->setIpv6Address($ipv6Address); + $expectedResponse->setServiceAccountEmailAddress($serviceAccountEmailAddress); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setConnectionName($connectionName); + $expectedResponse->setName($name); + $expectedResponse->setRegion($region); + $expectedResponse->setGceZone($gceZone); + $expectedResponse->setSecondaryGceZone($secondaryGceZone); + $expectedResponse->setRootPassword($rootPassword); + $expectedResponse->setDatabaseInstalledVersion($databaseInstalledVersion); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setPscServiceAttachmentLink($pscServiceAttachmentLink); + $expectedResponse->setDnsName($dnsName); + $expectedResponse->setPrimaryDnsName($primaryDnsName); + $expectedResponse->setWriteEndpoint($writeEndpoint); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlInstancesService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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 SqlInstancesGetRequest(); + try { + $gapicClient->get($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 getDiskShrinkConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $minimalTargetSizeGb = 1076246647; + $message = 'message954925063'; + $expectedResponse = new SqlInstancesGetDiskShrinkConfigResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setMinimalTargetSizeGb($minimalTargetSizeGb); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesGetDiskShrinkConfigRequest(); + $response = $gapicClient->getDiskShrinkConfig($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.sql.v1.SqlInstancesService/GetDiskShrinkConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDiskShrinkConfigExceptionTest() + { + $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 SqlInstancesGetDiskShrinkConfigRequest(); + try { + $gapicClient->getDiskShrinkConfig($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 getLatestRecoveryTimeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SqlInstancesGetLatestRecoveryTimeResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesGetLatestRecoveryTimeRequest(); + $response = $gapicClient->getLatestRecoveryTime($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.sql.v1.SqlInstancesService/GetLatestRecoveryTime', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLatestRecoveryTimeExceptionTest() + { + $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 SqlInstancesGetLatestRecoveryTimeRequest(); + try { + $gapicClient->getLatestRecoveryTime($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 importTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesImportRequest(); + $response = $gapicClient->import($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.sql.v1.SqlInstancesService/Import', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importExceptionTest() + { + $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 SqlInstancesImportRequest(); + try { + $gapicClient->import($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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlInstancesService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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 SqlInstancesInsertRequest(); + try { + $gapicClient->insert($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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new InstancesListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlInstancesService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlInstancesListRequest(); + try { + $gapicClient->list($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 listServerCasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $activeVersion = 'activeVersion442490015'; + $kind = 'kind3292052'; + $expectedResponse = new InstancesListServerCasResponse(); + $expectedResponse->setActiveVersion($activeVersion); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesListServerCasRequest(); + $response = $gapicClient->listServerCas($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.sql.v1.SqlInstancesService/ListServerCas', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerCasExceptionTest() + { + $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 SqlInstancesListServerCasRequest(); + try { + $gapicClient->listServerCas($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 patchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesPatchRequest(); + $response = $gapicClient->patch($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.sql.v1.SqlInstancesService/Patch', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $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 SqlInstancesPatchRequest(); + try { + $gapicClient->patch($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 performDiskShrinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesPerformDiskShrinkRequest(); + $response = $gapicClient->performDiskShrink($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.sql.v1.SqlInstancesService/PerformDiskShrink', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function performDiskShrinkExceptionTest() + { + $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 SqlInstancesPerformDiskShrinkRequest(); + try { + $gapicClient->performDiskShrink($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 promoteReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesPromoteReplicaRequest(); + $response = $gapicClient->promoteReplica($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.sql.v1.SqlInstancesService/PromoteReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function promoteReplicaExceptionTest() + { + $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 SqlInstancesPromoteReplicaRequest(); + try { + $gapicClient->promoteReplica($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 reencryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesReencryptRequest(); + $response = $gapicClient->reencrypt($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.sql.v1.SqlInstancesService/Reencrypt', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reencryptExceptionTest() + { + $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 SqlInstancesReencryptRequest(); + try { + $gapicClient->reencrypt($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 releaseSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $request = (new SqlInstancesReleaseSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project); + $response = $gapicClient->releaseSsrsLease($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.sql.v1.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseSsrsLeaseExceptionTest() + { + $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 + $instance = 'instance555127957'; + $project = 'project-309310695'; + $request = (new SqlInstancesReleaseSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project); + try { + $gapicClient->releaseSsrsLease($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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRescheduleMaintenanceRequest(); + $response = $gapicClient->rescheduleMaintenance($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.sql.v1.SqlInstancesService/RescheduleMaintenance', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rescheduleMaintenanceExceptionTest() + { + $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 SqlInstancesRescheduleMaintenanceRequest(); + try { + $gapicClient->rescheduleMaintenance($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 resetReplicaSizeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesResetReplicaSizeRequest(); + $response = $gapicClient->resetReplicaSize($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.sql.v1.SqlInstancesService/ResetReplicaSize', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetReplicaSizeExceptionTest() + { + $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 SqlInstancesResetReplicaSizeRequest(); + try { + $gapicClient->resetReplicaSize($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 resetSslConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesResetSslConfigRequest(); + $response = $gapicClient->resetSslConfig($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.sql.v1.SqlInstancesService/ResetSslConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetSslConfigExceptionTest() + { + $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 SqlInstancesResetSslConfigRequest(); + try { + $gapicClient->resetSslConfig($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 restartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRestartRequest(); + $response = $gapicClient->restart($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.sql.v1.SqlInstancesService/Restart', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restartExceptionTest() + { + $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 SqlInstancesRestartRequest(); + try { + $gapicClient->restart($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 restoreBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRestoreBackupRequest(); + $response = $gapicClient->restoreBackup($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.sql.v1.SqlInstancesService/RestoreBackup', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreBackupExceptionTest() + { + $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 SqlInstancesRestoreBackupRequest(); + try { + $gapicClient->restoreBackup($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 rotateServerCaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesRotateServerCaRequest(); + $response = $gapicClient->rotateServerCa($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.sql.v1.SqlInstancesService/RotateServerCa', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rotateServerCaExceptionTest() + { + $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 SqlInstancesRotateServerCaRequest(); + try { + $gapicClient->rotateServerCa($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 startExternalSyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesStartExternalSyncRequest(); + $response = $gapicClient->startExternalSync($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.sql.v1.SqlInstancesService/StartExternalSync', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startExternalSyncExceptionTest() + { + $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 SqlInstancesStartExternalSyncRequest(); + try { + $gapicClient->startExternalSync($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 startReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesStartReplicaRequest(); + $response = $gapicClient->startReplica($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.sql.v1.SqlInstancesService/StartReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startReplicaExceptionTest() + { + $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 SqlInstancesStartReplicaRequest(); + try { + $gapicClient->startReplica($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 stopReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesStopReplicaRequest(); + $response = $gapicClient->stopReplica($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.sql.v1.SqlInstancesService/StopReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopReplicaExceptionTest() + { + $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 SqlInstancesStopReplicaRequest(); + try { + $gapicClient->stopReplica($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 switchoverTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesSwitchoverRequest(); + $response = $gapicClient->switchover($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.sql.v1.SqlInstancesService/Switchover', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function switchoverExceptionTest() + { + $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 SqlInstancesSwitchoverRequest(); + try { + $gapicClient->switchover($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 truncateLogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesTruncateLogRequest(); + $response = $gapicClient->truncateLog($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.sql.v1.SqlInstancesService/TruncateLog', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function truncateLogExceptionTest() + { + $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 SqlInstancesTruncateLogRequest(); + try { + $gapicClient->truncateLog($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 updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesUpdateRequest(); + $response = $gapicClient->update($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.sql.v1.SqlInstancesService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $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 SqlInstancesUpdateRequest(); + try { + $gapicClient->update($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 verifyExternalSyncSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SqlInstancesVerifyExternalSyncSettingsResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlInstancesVerifyExternalSyncSettingsRequest(); + $response = $gapicClient->verifyExternalSyncSettings($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.sql.v1.SqlInstancesService/VerifyExternalSyncSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyExternalSyncSettingsExceptionTest() + { + $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 SqlInstancesVerifyExternalSyncSettingsRequest(); + try { + $gapicClient->verifyExternalSyncSettings($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 acquireSsrsLeaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->acquireSsrsLeaseAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php new file mode 100644 index 000000000000..49cb2ed5b4d0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlOperationsServiceClientTest.php @@ -0,0 +1,266 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlOperationsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlOperationsServiceClient($options); + } + + /** @test */ + public function cancelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsCancelRequest(); + $gapicClient->cancel($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlOperationsService/Cancel', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExceptionTest() + { + $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 SqlOperationsCancelRequest(); + try { + $gapicClient->cancel($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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlOperationsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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 SqlOperationsGetRequest(); + try { + $gapicClient->get($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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new OperationsListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlOperationsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlOperationsListRequest(); + try { + $gapicClient->list($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 cancelAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $request = new SqlOperationsCancelRequest(); + $gapicClient->cancelAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlOperationsService/Cancel', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php new file mode 100644 index 000000000000..7bc1ce6c6762 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlRegionsServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlRegionsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlRegionsServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php new file mode 100644 index 000000000000..a89591d72e4b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlSslCertsServiceClientTest.php @@ -0,0 +1,352 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlSslCertsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlSslCertsServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlSslCertsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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 SqlSslCertsDeleteRequest(); + try { + $gapicClient->delete($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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $certSerialNumber = 'certSerialNumber-440611559'; + $cert = 'cert3050020'; + $commonName = 'commonName-1924955041'; + $sha1Fingerprint2 = 'sha1Fingerprint2-1316795939'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new SslCert(); + $expectedResponse->setKind($kind); + $expectedResponse->setCertSerialNumber($certSerialNumber); + $expectedResponse->setCert($cert); + $expectedResponse->setCommonName($commonName); + $expectedResponse->setSha1Fingerprint($sha1Fingerprint2); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlSslCertsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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 SqlSslCertsGetRequest(); + try { + $gapicClient->get($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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SslCertsInsertResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlSslCertsService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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 SqlSslCertsInsertRequest(); + try { + $gapicClient->insert($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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SslCertsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlSslCertsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlSslCertsListRequest(); + try { + $gapicClient->list($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 deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlSslCertsDeleteRequest(); + $response = $gapicClient->deleteAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlSslCertsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php new file mode 100644 index 000000000000..02f50f531d47 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlTiersServiceClientTest.php @@ -0,0 +1,142 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlTiersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlTiersServiceClient($options); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new TiersListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlTiersListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlTiersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlTiersListRequest(); + try { + $gapicClient->list($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 listAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new TiersListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $request = new SqlTiersListRequest(); + $response = $gapicClient->listAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlTiersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php new file mode 100644 index 000000000000..0defde537e8e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1/tests/Unit/V1/Client/SqlUsersServiceClientTest.php @@ -0,0 +1,434 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlUsersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlUsersServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersDeleteRequest(); + $response = $gapicClient->delete($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.sql.v1.SqlUsersService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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 SqlUsersDeleteRequest(); + try { + $gapicClient->delete($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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $password = 'password1216985755'; + $etag = 'etag3123477'; + $name2 = 'name2-1052831874'; + $host2 = 'host2-1211484325'; + $instance2 = 'instance2902024968'; + $project2 = 'project2-894831476'; + $expectedResponse = new User(); + $expectedResponse->setKind($kind); + $expectedResponse->setPassword($password); + $expectedResponse->setEtag($etag); + $expectedResponse->setName($name2); + $expectedResponse->setHost($host2); + $expectedResponse->setInstance($instance2); + $expectedResponse->setProject($project2); + $transport->addResponse($expectedResponse); + $request = new SqlUsersGetRequest(); + $response = $gapicClient->get($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.sql.v1.SqlUsersService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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 SqlUsersGetRequest(); + try { + $gapicClient->get($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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersInsertRequest(); + $response = $gapicClient->insert($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.sql.v1.SqlUsersService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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 SqlUsersInsertRequest(); + try { + $gapicClient->insert($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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new UsersListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $request = new SqlUsersListRequest(); + $response = $gapicClient->list($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.sql.v1.SqlUsersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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 SqlUsersListRequest(); + try { + $gapicClient->list($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 updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersUpdateRequest(); + $response = $gapicClient->update($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.sql.v1.SqlUsersService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $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 SqlUsersUpdateRequest(); + try { + $gapicClient->update($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 deleteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $request = new SqlUsersDeleteRequest(); + $response = $gapicClient->deleteAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlUsersService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSql.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSql.php new file mode 100644 index 0000000000000000000000000000000000000000..d3ee36266ae2e9c171fd3ee425738696a3224fb2 GIT binary patch literal 18990 zcmc&+O^h5z6;7}1wYS#4WhY*b6KB$~h`q6Q;*Ckd`gi{J$KIdG?%Hv}N~7MHp54a1 z)8pv%7aL9oJAb~&}K>Q0Nek3F$BnT1`aO09lL7cdOfFrM}t9q(>c6zIO z?Kp>IcDi5H_r7}X)vH%8bMZ=RwS}I|PMA&8HGH$4U0%=nt7f+4I=)kL?Cf&8(Jo?AA3<9zT< z6}}mvgCf*4)=aNu)XeNer7#2U)D7QQnxOJaMIyhnaK~P{d9Fa@FCbL24bRKcC-4Bh ziL&rdtG#SnwXEkGKK$pTI~6K zuxMLm(@!QdZkcwyV6GZ>Eyqv$$ z5M8vuetl!DwYe-cptF}PW-j@9J+zK-aG_J-dXm+B4t?}R4V_YT9y}DhIYQlRgg6y* zv&>O8hS9RX<;cPY{+4-Kc+eoLS6yby$6grSdiJWzSBc4-U^3LD!8>wwwiN97@#u4t zkR3r33j3VV;066U%7A4QjN0vXYrfs|N~Uf4=Dc~Q4a8%F`mFkpmeo$}zz5MDs|kw% zUOdzX-wfabXg7@e8MEdO?I2(1ljx{4*o5h)9LbHqnreEc8xAHyA>bq^0k(5!=dx2@ zAF9LS!O>?&0+PBHb0kzIIF{{3F+iV7; zh%D`-ELG4kn5P7hc-ipG2;-m{iP7W<<$XYf_ZjqrIHEv%s^MBPz{K3YAaSqv=ALt) zU!;b^|McRS7tD^Xwf>GK1HRD$3PT%CLjg{%LJl2^_vde?M42%*8c z>P2({1b|%XQXT}a1=EFBiU#+Yt<7A2i`r~B2*m!TsJO))wuhHol2$6$d!;s=LBC9S z51+}gLjnC4H1xE{LCIWmd~?R|VEb1m0hc5#UQ*CvlZo`t2Ua9#L%?ttj|4ZRPi@~>-B|tAI17efuZ_B)v@3)*p!7usz(iFs@j*IIuZdkShrpd|JdTH@h ziGooD3L=x}7idrmmqQL}R=is=nP6zz+OUPdDe~+`{SC_oPh$JXCL7j1wGFF`vZ691I`dHFshfm;PmWa;!>_HXi{tbp z-9pcZ_#rV3Ji7&_ngqd??8FV`33PAYqu)hOi6bxEvp}bWo-&G1eYr~VGN&CRQiG$% zxC!vQZG`9FB*19;xU3N*_NKq!*+r+>uvXML)vwSrD>NS%$2XEh8XYof$u`Icj%%`{ zie-@s;i4>gz{_0yuH1V>!Wx}P|B@CVhMd++ZmjCW;Bg7hD=K(4n@TUq8{9%bZ$iV1 zrV0zb)0#Jv4g&j|lyEG%a5x8crkw;9gNqU|pHv{GdmjD1938vzH7h>4ZzB|ZPD4+M z9y@QE&6>O3ib?c^XdN6a@{9s<<{2D)QGtT!Ec#a<*AOf@g5lFBvrG?UaJpcRAZ@JH zsCUz7J~$e)qjKl#hz4NNm9hW0X1+gh`H3S}1^7QcoD z*&~0w6&w)vk6!A{O|LoFd2A5|nbZKUK7mm1F8K-{M@I|!;`JMq>f-B_a`ndSLZw`s z8lNhc4nBtWp@IC3#kraMBK)b5Kj&tvrSeREwsf$sZ~*P&ic|E3{b(=$f?(Fa1=RuB zHoV%ZS#R5rk&+TalN@~$#E?bFRmOXBp*m>+4z&8a8agQoR7|(wxN9ZLyS=dLTFu)D z5Gp5WU6X)C`R09J|HCeHRz!2tbgjmE`F>EpTUc+_7EIr_nkxws1$+WM0m&weLrlI2 zPSaiwc3pfM4R|neb# z8#2C*4y~U$a(%dRvvc({8Hdjou?A zT7!`pK05KKK!F?RFooVST*J0ayK0+vO?zk$oj4}OiF{R<>@*P#5|uf0P<(?js-qL- zTZ`rS+5B{M;q}>Kb!M&UH6W!W7E1kM59Bcqz%IcgdzeRHm#NKT6H5;a?jc%wbk!%(v!e6RRGKAM z3vj=ozUKNRdKQ~&k?S2;0Z%xw9zp{S|DGMkqG<&yKX%09i(u(bb6083-rH~IpDz1USv9kTz`!oFZoMJYf%^q zb>6CRuG)aj%5+<>lk%$eB6^&JX*RpCstU^W9yO@k@lhceOvajWFM%xb-H{L{w*IQcB36LQ?o4f zs4Py+K=ROs$+!7i2X~Bq)Q^sUk+CBTT$+&rgH)+q&8y_x7cmM1r&da^YK5gXqF&e((A2)KrDUDq9!MF7d{5=ir058Gk6amA# z%%0=WhTL$p_`#t42{0VQN@a$n&>Dxi!|)7cctXFjO@_zl9VGslhIWz=i(?M$l2Hip zI1_Vw5R%O5zJb%|6BKk zo(AC|@U-}77FverXfd~+k@uOOjZ+)Binj?J|58J{=w%32q*epMn!HN!GG zogDbP;M=q*V~f2%ge-P&sJS)=JC+J8B=1d=`SLeZch(SXik1@a^!35MM$FA&JdZ zYW7f|a4(LgaxrEausiRsNZnQVg4+HpOL6j*%3(YX7gO;JNuAIPhGF+Woh~jM(}*Nm zPDdgUa#pBGS!VLWW;2o%?WY%4q@Yi`L{xc~r4pgv9`CNyvPSac-GGI(M{QBq3r(E8 zo(OY^8u?}YVk%n!%oN~nA;OT^!}c@P2qOt40$!oOuj%Q62>~90Wxo15Vlz_DnzGGE zQi;@HRVqE5ufqQx2KO^O(lR}M0Ve`_Q_n7KRZj$>Od=h4Zk_H#KrM(vCC6H!nNRgt zD~KdQ&QFTzjY6ipy2Ujj4LQs+ zKcuEAxB93m+T9{VTlzAJigt@LMR_+wIz`<`hdj=1y!^J>h zf6z_3#TmXcr__9!d4k6usLIe^0vVw{9HEyfm@8YC+C#o1?s7HS;`)d!??3$r!_LBc zF8S3axj<(qZ{oGGbazF30oWe#Lmmm@aC8h!i~}Rw z!Mb}kIr89jhMPGa-X88p>v)9*dJ;O;dTL%c0(b81Ix*9r{|su;zEjcOU_TbZe>uci z%dI%nfuISF|KgH&$8IfOp#NU(r%~(0=fYo|ITQTmknj^laJ+z@P}=0@iRhcb&j@Xx H4TSy=eITy? literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlConnect.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlConnect.php new file mode 100644 index 000000000000..e1d5c708637f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlConnect.php @@ -0,0 +1,59 @@ +internalAddGeneratedFile( + ' +¬ +0google/cloud/sql/v1beta4/cloud_sql_connect.protogoogle.cloud.sql.v1beta4google/api/client.protogoogle/api/field_behavior.proto2google/cloud/sql/v1beta4/cloud_sql_resources.protogoogle/protobuf/duration.protogoogle/protobuf/timestamp.proto"r +GetConnectSettingsRequest +instance (  +project ( 2 + read_time ( 2.google.protobuf.TimestampBàA"Ô +ConnectSettings +kind ( 9 +server_ca_cert ( 2!.google.cloud.sql.v1beta4.SslCert9 + ip_addresses ( 2#.google.cloud.sql.v1beta4.IpMapping +region ( F +database_version (2,.google.cloud.sql.v1beta4.SqlDatabaseVersion> + backend_type (2(.google.cloud.sql.v1beta4.SqlBackendType + psc_enabled! ( +dns_name" ( "Ü +GenerateEphemeralCertRequest +instance (  +project (  + +public_key (  + access_token ( BàA2 + read_time ( 2.google.protobuf.TimestampBàA6 +valid_duration ( 2.google.protobuf.DurationBàA"Z +GenerateEphemeralCertResponse9 +ephemeral_cert ( 2!.google.cloud.sql.v1beta4.SslCert2¸ +SqlConnectService +GetConnectSettings3.google.cloud.sql.v1beta4.GetConnectSettingsRequest).google.cloud.sql.v1beta4.ConnectSettings"L‚Óä“FD/sql/v1beta4/projects/{project}/instances/{instance}/connectSettingsß +GenerateEphemeralCert6.google.cloud.sql.v1beta4.GenerateEphemeralCertRequest7.google.cloud.sql.v1beta4.GenerateEphemeralCertResponse"U‚Óä“O"J/sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert:*|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminBf +com.google.cloud.sql.v1beta4BCloudSqlConnectProtoPZ.cloud.google.com/go/sql/apiv1beta4/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlIamPolicies.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlIamPolicies.php new file mode 100644 index 000000000000..018b72547dbd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlIamPolicies.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +“ +5google/cloud/sql/v1beta4/cloud_sql_iam_policies.protogoogle.cloud.sql.v1beta4google/api/client.proto23 +SqlIamPoliciesServiceÊAsqladmin.googleapis.comBj +com.google.cloud.sql.v1beta4BCloudSqlIamPoliciesProtoPZ.cloud.google.com/go/sql/apiv1beta4/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlResources.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlResources.php new file mode 100644 index 0000000000000000000000000000000000000000..bac030aa61ad8ecdd85b6a5e7dbb1c86a12ffa2e GIT binary patch literal 27392 zcmcJ2U5p#qp4WAEC+R*;JC(|p)5&CdJeiqHW~P&NGMRkL+`0a!?)JoOJ1#q!TxGZ9 z*wx)8ZrkIs^KsEdLRzF12=TJga$i^>1QG(RgtX#`2OdBRJS;+hR^kbm~!t3(D z@BcsNl&kzv-E$H5;ZC}$&i|bAKmYHK)USE9W;h+YyIWB_2GfL-XHXa zy=Jeo{&KXp=ML7Jy~BRH;|?~~*YoA|Qn|KnJH1is zmiI&F*6Yoe?yzxJK5_8G8MyLeZ-c=L(QO>MUcb?F*S9O#U3}eY3>z=D8Pba!L3&~T z(0TE6GfR*j3DN8{Ja3)f;6+u#6Ms>xbehSu6R(_!PV z|7(nWHfZ$w?!cQpl#k(ypSBg!Gp&}7<1NtU4Ie9nqff*i{_B`X|9Gl2lXA=kQ}PDr zc0*C}+BF4@sTb#etEJE+>3Qw_$@fEz3-!SifH!Kx@_ni&mNU(c)g2DrnXBT&>qckf zCS&Wd8!P4=amIbyZ_8tG2yk)%FXHL74Ygjqstx}H%(G&NSS-0nAhL`9F%vUSi=|iX zZY#M&k5a$4AOz^;S!2*`clXV_SZelKa>_*do`yVyiH-4?4e;UkuN+33XT&LxfY;cU zOI$G%;^e^H2RX@wr2c+PoShzaU98(ricY3daGqtVr9x@j$(8e#Q!m*SD_7VmSb5_o z=0#yvt?fd&gy&T&liSH;iJt5hpwing(6u8E6 zM*XTgbi2e9wmTdGTb}t$B*2>Tp)-Qy;Im4kznzb`IiNOt;B|m8zZ3=lH`-md<-Fv{ zJ$2ewG-&^{A%pIupAw~{9*Wg4oNHpOYSn0?jITm%0+}n~M6O&f)r?r`@17Lr6grvk-c`D4*b%2F-iIeA(_c2Jf6sZ{N{S zh!|&4@)(LGJ{Y)tNOu-XJh(Av9<*QMAbc<5Rl!?? zl4|x|yI7!J+^Hj>=ESw(pwaajtV4KlW4dTH-g(Ith7ommW=&j{M~xL|n(`E-B?XV) z)Q3OKkaOtD{H1t5u(U>p7w17wfjb>iLT)k+*opLaN5Kw}#YSzs-$tj{+qWf1n;?>) zS={-_Z^vS(e-IN_qdqlniO*`)Ov%pVh(^JG#qu_Iuw2b-TZ$LM{J$)g@&)@bI3C1p zKP%L7J0vM;WhYlG*YkQTSRN8Vz6ZZgy=>=O{71ck5h<09||FDRTdSAiuuXt`}&*`+g zuac)3c2GF1@{<=Y#Cxr__X@J0Ie6D6;qNqq;xTF9yLkG``P<54xaE%yF_Bpk7bl@B z`Z>#BH;xNdQP9^Su0#l{_;Ub~NWb`GJ`^A4kAYJ{3DKSNi(c1FULpjfJaN${Q?JkV4a7DLxFFN?EK94x-}VC*?;*GRTY3PZo@_dFQJi#{k`rT1{q}Ic+=_!c>^qDBg7bm64B~~EAoZ0d zKDlhE3U|agz3k?AqimSP)1O6Pa0)k&93dT+JevF0gxTn@DulFY_Z^6Hm}^ocUK9!P z!(KK#iDpt?i{QO=k?0Rxc!L9sVIm>MlXfMG`|Me9#tDCt`adzToLA8N^N{F+o!C5R z44~xrxR@v5a&{PH(p01oFogD{xk`WWxzqku%pg@{YgH7MWWet*F!Uu@9E9d92=4UXI-PN!Ap`B)n8vBDD}Bm)iZB(8ZbgNP9#o!uR#*<4Y6Xs>o$+^ zWmcRmC<$4mGls-tCJ*r0*o}e_6iquPIZ~;xl3Ffq=+zg#E^b zDsxjj{mpz>dLepSw8bq2r7D4#SH=0mhKDc%3{+qary^yDr0xr1Rn5jvJOHY~ z*m&!(a`6!Sh_XNL-DNvHyO4~T55?K$2<#1Wcsy2W*O|6!aO?wd8giu3Y9Y$wxgON) z5t^XT--WkNZs!A$Q2f|zI8ApjWQ810e=r|)w%5twL-S{1)yE6l8Kk%q=}#j@j>(A4 zjDUbhu*68xMqc03TS=awr;MJD#Cx>PHqM~YZ1zS#lY5Bs@;@bOV1+Ds*a?t>hixEY z!eEe^J;IVNcPnaS*jU&V7xYm#LnercN#p4VTS1Xh7~D_AY0`ac0+M|ujfDui4zx+y z69X7+AyIpt_q`*|dLyszc8L?g1q}}jc>!dQNPiJ|9=1QK%7e%>z#h90+60M3&_$j? z3p=(>0&#^TzlB2B$JwxIy39|Y<~&HzZi_rl|6PjT9c|pL;k*A2#@!VL8*yM^n~{Va z+yi3uUXRQr&wB&ADES`mq9HDL%>%bJf;aAf7-89T+04Dhvt;KZewOsHHK^S&ByvnV zC@F8R4QlTH!b^V0pr`HavAh1_6S3CPHUu+hht{X1^bJ}%yNTv+3bQvFI=ww9aX{id z@c+j=!;ci5<b-Ad((p-(7czQ+wrb)M5zA9u3^&EqswkXMWrnl_aDL zg+COaofw>L^9ymM?=>A?L=A_H=D{Heb9QoW({iM5zCfR^iRD(;liamAez!>Pt_!0- zXde>S_}|>&Z%!m*=HzB)M5-)#51+-O z++!uOXi!d$**Qt@z7wna5Ubs`lB&tC7*Yf;ZS&^^r8}hz+&KkUYfpqZL*Hr%Bh9HV z#EMS_Y=F)3l6|sY`*#Qy0_IFE3j5~-eikgB48iX!%|_R0kukcJXmSd^EBramrGlY?OLtLk|m#o^ea`my3sUk#IvvM^A)FdQ_T9c>mcqJ2zispP~WjS05M-c zgvfmhOZRo#>kWK}r2p19)7-zUGGzp?Bk zaRDaz^iG&TXRe$HW!_R#e>H|Q(>ULtbdX8A(_UW7cl4wRWuKVNEhYukRUyWoaQs5; zoz6+lJ_l5GRm7d~*wpvpg0|J7VsM+`7+i!8tD&X-Moe7JyNA7@yURXi*hPRUK zg)MRA@EwU>rO+q*8rpt5D)SYbXZIaMhr(}Y&eZ>oiF3g(@s>k%;k7&xmtab^_h8cx z+bvp&hu9=S7VnN$(sMm(j$xS9d2W_eqjw^d+FV3lgKmCBLAEhPfkTI*J_qWSQ-3=q zJ_>GnE_x<{De!kju=dzLk|7y9@%;n2AIS4&r%guSEBBoWqd}~zXXI?R_b998@>*6X z?xdV>{hUK<2xP6wCC)yP+u}o6+d-Rzae@iqGC;8S-uZZy#3T!;KUxv1)>|^vHN?1B z91Yqm067+@9S9j!Uhy|CH&%md2Wmu893Y$?2j@K%J-t8wltNRIks%+H<#?oY&8GKy z5~_@+Mg*&-pys^SVZisr3dgNENI@t~q(7R!O00`Y8raiDwzapn*XcD{9KoDrHTo7P zt^Z{M`HC=BWcu;PtUud$6veb=D~FC??F zVOPkt|6v4y6L=xd6M-%`n4OmA;A0p~AW0;@HOa!oB8ztNCDZ2Ge_vn=Dzsn<4j_iz zK_n{1F|k`BPUh`l!|8Q9$B`3lMBZ57O(2t&8&5x;e|T~oimInbY-5*zhS$0&P7M!W zzqT|1&y2RIG(YPYIOX8<0b=-w3`_Ei@W*+`+Lkb9%zazLRe+KBjn6Nhj+%e%cNUlw zCP~Bup?X79K`A39nou`EH~cZAHv(x&Zb!|F5}0M8ZRQ}7#)+r^Ay&uSvk5n<*MBDu z{b)o{6cjneR-3Bc$T&gDoDv}_m>YrP)B|xw2XD1R0~_ebvL6*7Z917}`rSpbL^1k_ zVE!GIJ0;nEq`1Iv-tf~PK@F)=vl3C{n?EA`r z^2{qlidZ7mAF9xI)KHZRqy17Lh}x{cW*1Wxah8)O5xLJV!gklS`GSEUrT!N5Ug2=A z-h&3$dXITxQtgHGh~$D}>Jg>d+B~@ zp5vqWD4LoLd>o$bxzzg;fa%!d=?J|)1vms%3dpz85oZMH%>_g=aqb-2ohzE9SsX!q za^}C|YuC`Ss0fgim{O~hG3|9mhh1$F&C;_(6f^ZK9rX&CzcckLt5V8I&eF5YRcn8; zs0Dv`m2F`L3M8~CCegL~|8UkDzHplk75C$ zjL^mR#PSQT5IlY4USO-$9u;Tk&FUGSh$NaOC=CY_0c&?C$Pf}Ex8@&I7^I%GEw1>x ztPRk>0q7_i(=&c2&ZCoppK{e$c(w?OH~>pe^-iq&Q)QZLo7&#MD^kWm&sP^~4f)FP z@D9a1l#U3`8j<#&1gob`i)6(e?DYnRl-aZoV2{62?lnQze%6DXi`0R5@d*qy zf63eKFfC>R592&WTn%ax7?Gf|tI1`YG&K85E{gTxFC??1z^rwOkfv}wQ7Ct=s zVu*ot!OWZ)Epd_yOEtenlu}}z8GvP(>2`qeB@h34fKvbFw73#AQ5av%kcU>EPr?x( zWrSb~VZ1N)=n%<}4rGUdlPPRjW}#$f{P$Rj2m6 zGMSG-b49LPDj`=x4FkFfB1TOY*+Pj*vrFZggH#cEE-1oLyI5$KQb!8TEVJOaZ!FAV)EpLHskYG&6sO9O&4 zZr6aOUEt9$&G*3_Pl~ox#R)s8(Z{h7Nl+dVaE)`c?ci9@1JQ-GRVWpBIp?7;&jr8W zcUIN7K<74wEvG1Dc9DB5*t;3j`5PB$WuTH>oP>X-ax0gp+&>6b(d!l^Z)--9l8Nfk zxFbgKgK>G1+;jtiRRXpwV~x&$JBdIMiYOi4nQdGl$V^w9Y6SxzX^S=_CJ5syAq?xc z>1DY>7yt?Qgl-$}5yGm-K0kM|ncU-g#mVG%0l@#nxHd&e+d12*SXBl~Wbl5FoVUP1 zSix4=SSN%AQQ~u_+P7_dVBQv=?>;9d5Y{BFqshgJ$Tkj54S50UY18ENM0CNhX0&K4EeErgL47#|Tj?Q*?}oHucnUC-LN zYJo9l8z0M4W|~4v2L=_ko=fT?mU{6CF+^~PgN5emMJYO{wX1F$H<*gR0|C(JG@~}C zPwAj5ctz6E$B2{;H|bpnE3#;y@N>)fjMf!;w~Nj+%A3~;Anngnf4n5l6#CHHfzGPi zTxWRKPo+wKIm$gn>>LT{*JMSh^tK8S!O!Ip{ zniDA&kw{0FQWJ>YfbqObeTiQSLCJrZWH<#C7mVmssCdeK;e2lDuf)VD4Jj$k+jfy< z;zUIQ=nrgEeul?ZDOY`7A?=kZ<)JjyUnp!q9ftoWIHvdQZGOu8H=199`7Ud8)C&@shJdUdZnuah@_TfI{IUASqF820B>{%8(bB} zt6&mG6S4_$noA@Uh}2(?iIs7suI}a`z=+moH4Nst$0bj4xANS z4nzeA@ylo%J160*3`EE6?jw>#n~M&?nve9#`W>`nI_O5DVzH4*a7PbL{rLjgi02h2 zkiXR$q05I8x#7s#k$HG53w%c<%|z>{wV_Jg0dft;+0)nJl8T8PxJZY*L_I5Q4Ci^A z1PqovE2R&8HmeLkHWq}-24qqN&qxS2+x-KC`DH)eH{vq9d8)+Fetn>#U|wI|I9;u| zje1a5QopqzF3l@{M?mwS=V9B(_A9d0gC)rZiy@eKsXxdshLFrXjR_eOpN$C_5f5WR zVrQBVB!=?hjH-eFTgYxh>K=$}=K^E#mwwkxDkH9hE5Ies>5gnfZC@RFRL&s_k66O_ z?9a$ZWySe02&yVX5jleYdaMc{&4=-CQBmkObNcY*Y)JX2_yCs{%M;l0+g}O)k@pAq zaLM`g|4@s>xpE>&o*8T#Ad_O*ERp7=aD5Fi(FiLOj?-4v`1@cZ?7TeV`0M++5tdFo z9@S{#Z;L&74>87gqu+K^e3Bb3;_2gsCyOG{1HW@)oXmd{_a)MI=La18*+Up+RXiQy zm5h4q5HI4nlM!xW;CN)OX(+-?5LD|Wq#{*#C1qnw)EZ+;3Ov${i9&)tIFOoJh*X0W5S9= z4X$*VhDO`e4%V5AsDuR)2rNKqJ zBoggXreg1uYsNB_@lsKZzhki|+s%c$U0&*D@$Tqu2qSdmkQ zvyONM-6l~i!(UEdp40fc;`_m8xOkctJfkcK}%LRh1hG?%B(E~hG!~BPr=%E_wKTJZ}EmQQX3=b30fiXf9GS|opu38fd zy+YfD4PRo59ibMu|2&j@V0g2z?W=J3vDRQU^)=ZK)uAHnCJ(S0ny zU%9kZ*ru{@s`FNX9eB&=37Vl6)cr7H#*zN~1nYqORoy#yhj>9nrWQ=PIfAHjG4+i| z_&h1Y$J&(ebtzwiBh?y`?)o|#=@dK{XTrm|2{%wGdw(LP9bv?W0i}MmgmAxV@Op}S zt6-9&1*X!2JM#|dYynFai3K)=X{piHtoa1BpJ*`dxNp&2%$9c|svULS#2Yyu2-4kX zONMqHo3DhEBi8Y)xYBBS?0!1hPjuE{e?=yw6tN4BX~9q)StGveNUBLAG1s{)u0^*lBNNJBf#Tm$5aLk zl8g?F4iXlN&?aQ9%06v8WF$hq`gagW@B9&xBB3^UIf`GyQ-s`C^psV|_#P^pCJd>8 zSr*?!REa>PWMoSxk78pCK^Md*n^faS;R23C9u;({$N?36kA6hdD*C}DX`0LUWJH1) z3sEdZ!kyN^@u{DR%S3f_8wzkuAu;Y{>$DGXv6!sjj;ynM0<2IAjPw$eh$G8B(i799 zL2g3EAFebGYE2NdYX-yCe0@%&-!l<@HNO()X6#F~_)j}#V=gYB7EOivsGDBJ`q;XU zY#yBvAB4L>48m8M$l{X(Q(u(3K}<#ixc<}3NC>h^nF)?uhof#9AQDc-$f&@8$b;Ul>WO=JGhL(dC4S`)2;cZI6E4f z5oe$-IIyahOcxi#qvE~@7zHD-PsN&V8zG#iOh#?u$h!t25HQc^Gt1(VhyEIfUZ@{P zq*i;Vmq<4cMBX?7Sz`0J3=LBl{TXfz#9t73+}2{p+yLem7+8kY5uMV;vn+6?qaEMU#~BCI#;zg_OPiNBZ{day zS?b&dN2`?FF)Ass3PzPqQ4`sc3BQv14z2fc0x!omhgisWAYIyk)g}v}5pR=MO>%coQqK}&xV3<i>!hkd+F2nWXa&mF~}WP zLk3!YRmdgE`VH|IdIHYtokdh%qncDMMV|!7q>%~L2!jgU>SVRMQC!m2$9?X>dV$s%BwZhL^lx$z$y40&U8~R zO3=8RYz9-F5{q~ZcEmq&_ERt){*lc*HkNK?#3|iVgPI&Xn^o0{!0%SQNC5cqVAQK| zFt|n$`o)|73|Bp1G14`vj=CxdsZ0`;8$lGAuZOAI6AB*c+$ue(TXmG?aJ-oU;`ut+ z6M^6}XKU20DoY$Zuji<~6U#!aD?YRz7b+EiI7x{G&QXxPq668d{LBSCRdAMRoJ?or zjg^~qPBrPa}kw>w9R7vs{DCz4PQwukX(6$;mkK4E;79unN^D)HX zG)DXs6Pr7go#!^y=o$+*n1*Ur{iwmAE_T-G!35YURPCCBVpAi=Ne;?BQ1T$p z&lbq0(uK}A(2?xo3soN}OcbcRG7lAC&zcGN)Hw)VIPM18E>l%2pC#2ml2%xxBa-#V zDAn3j3tPJRmt*1#Hm9{5AAqcArCLgPi_Z-7Q?yrJT#b{`AA*!X&O`xKi!Q9U$8Q!$ zDN!A@&X0{>E#CZVr-lxdLQ+2_m%ADx@mM*rOI5;3$mV$oiY#IxU=)j{drDaWt zApO-n&~D(*uRy&>>)<$5d2ssn=2yfurF^EEM@6(`^We*|y^Wk9V&W5Hk@uvtLJ2dl zH1Y14l{E}XR8`7$Z5y9C51e~QULu#}KiRyEisjIQO%!m49;8vS9C~oaxDeOGx!OF>3$v@V782XXP`L=BX+Io>odCZZ5#2EMY4)Ylo($k)gr|hc{JD< z67ySI=oWyW$0D}S2}4CC2$bN6>HawSxdn!JDtjQVB0ezJ_sm{IFYu@ZRKq3XUySl9 zXb9|8Vn0_uv?D`N8vt@^zjw>S4@jX}O8DB&T@qeB%Gy&*$FImqPqs5~*1A literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlTiers.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlTiers.php new file mode 100644 index 000000000000..daadb43d14f7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlTiers.php @@ -0,0 +1,43 @@ +internalAddGeneratedFile( + ' +Æ +.google/cloud/sql/v1beta4/cloud_sql_tiers.protogoogle.cloud.sql.v1beta4google/api/client.proto"& +SqlTiersListRequest +project ( "P +TiersListResponse +kind ( - +items ( 2.google.cloud.sql.v1beta4.Tier"S +Tier +tier (  +RAM ( +kind (  + +Disk_Quota ( +region ( 2£ +SqlTiersService‘ +List-.google.cloud.sql.v1beta4.SqlTiersListRequest+.google.cloud.sql.v1beta4.TiersListResponse"-‚Óä“\'%/sql/v1beta4/projects/{project}/tiers|ÊAsqladmin.googleapis.comÒA_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminBd +com.google.cloud.sql.v1beta4BCloudSqlTiersProtoPZ.cloud.google.com/go/sql/apiv1beta4/sqlpb;sqlpbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlUsers.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/GPBMetadata/Google/Cloud/Sql/V1Beta4/CloudSqlUsers.php new file mode 100644 index 0000000000000000000000000000000000000000..5f3dba80e27d83699d2cd13b6f689eb20ea97569 GIT binary patch literal 4038 zcmbtXO;Z~;7>@Z05d<8C6vw4u>trS*1$*LlIvFP<;}0O7A=ra$I_Y@2v)+}l%Cfuc z${{r2(o;J<_TEDeogVs2dTjdxdgveMKj-4hz=uqJ0O0L6wnAc#y$x=!z9{9IrkD)S_U)f8v>=C z=P32cfnDEul;bE*5Hf8e2sAMR6E%*7-XabDymrH;rWP=R!M}Sn(5XWiHEj9~M6{|k z4Lcx!Fu1nac1%WHN8<)1$0SP+G>OUA-t%0@z^bOaD)Xd3Lh40_5#KTFdVvI{Pd(=P zWmuZY>=M>VB_COO5N^xiXj5B~K4vllPOfUqZ4``+ocf(0wjXjt>CWpzrt4w6{v6or@QKKd<&l9$s0j>+{&p`9cs zB^hcbJ|7|(9t9oo5=r^Q7keg}ybgLJEJU~g#>MNoh>@hP0qmWL6XqRXsqE{M==ZB zn@Zma3qDxDByUrR$LOYVf0G86*eCIQr0ZnOgAUor=#Act=0^X{MlPLJe7Puo7(oj> zoHDfGL)W)TqItu%-9uvOO#_r+=>}tD-(!KO`#64%7QE0{CvQ9| z6{{wx7nkALC@jbLa9HU{A{ta}qMa(@xpGmxmCU~1|2ZB9Q=_Lg?ps%Eg zr6ShzG>-Oc(sA}R@oAHqBG}kC)O<4W6`DC|jAzhD$I%$iHkZyGbtI^ejsopU2M);HP&%+$2uV;JE0S=RuMLu9f)C>!a$gk# zkI@)A@b`ZM;SX1fba4dkS z2s;j1kXA3Q;1Zfu@#>zSS!`NBeLfuOOp=xnw%UfRcTh#B*F~tQvoV2(hFuN`%;S9# z`7RPk{2W13y-Aoxlet=Pv#J-jqE|3RGx^O@t)LgPFZEhwZ95vlAEDdbF&Nq@=GXLW zK3}SBRih*LCYtR|Z)}%p<>)Amp}D?6i8hAsqQ(B1e$4U2I~48r9w*S9LM^+gm$Q}1 z7p3ijUVT+w(`#Fm@>;&QUR*1H`yZnDt&;w-R4A^$(od|0IOb3kCQpuz0O_uu92(8d zpy@W0Rk0y=3*7|O_g5kD49%TJ1K!vy8gSh!ZOx(SkY&DWlK`YJ3dh7gy1{E7$R-Md_x$M{#sqCAr?l0~^PycJw5i!X$) zxx{;9F(YmO_?HM8<9x#_=O?r0@Q;5oeE9%}RnhT#xGQohuMii>>50q6rE(g74<}_# z1XAX2!gA!x@a`vX(A?A1t}BE9o~xHIY~?kch|k7^ hIP*Wf-+4VO%Lic3dy!vasCmj;QLL12x?^;V(0}tG81(=E literal 0 HcmV?d00001 diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AclEntry.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AclEntry.php new file mode 100644 index 000000000000..0b1a3bfed6eb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AclEntry.php @@ -0,0 +1,187 @@ +google.cloud.sql.v1beta4.AclEntry + */ +class AclEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + */ + protected $value = ''; + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + */ + protected $expiration_time = null; + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $name = ''; + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * The allowlisted value for the access control list. + * @type \Google\Protobuf\Timestamp $expiration_time + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $name + * Optional. A label to identify this entry. + * @type string $kind + * This is always `sql#aclEntry`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The allowlisted value for the access control list. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * The time when this access control entry expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Optional. A label to identify this entry. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#aclEntry`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AcquireSsrsLeaseContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AcquireSsrsLeaseContext.php new file mode 100644 index 000000000000..514202dc57a2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AcquireSsrsLeaseContext.php @@ -0,0 +1,217 @@ +google.cloud.sql.v1beta4.AcquireSsrsLeaseContext + */ +class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message +{ + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + */ + protected $setup_login = null; + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + */ + protected $service_login = null; + /** + * The report database to be used for the SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + */ + protected $report_database = null; + /** + * Lease duration needed for the SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $setup_login + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * @type string $service_login + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * @type string $report_database + * The report database to be used for the SSRS setup. + * @type \Google\Protobuf\Duration $duration + * Lease duration needed for the SSRS setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @return string + */ + public function getSetupLogin() + { + return isset($this->setup_login) ? $this->setup_login : ''; + } + + public function hasSetupLogin() + { + return isset($this->setup_login); + } + + public function clearSetupLogin() + { + unset($this->setup_login); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @param string $var + * @return $this + */ + public function setSetupLogin($var) + { + GPBUtil::checkString($var, True); + $this->setup_login = $var; + + return $this; + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @return string + */ + public function getServiceLogin() + { + return isset($this->service_login) ? $this->service_login : ''; + } + + public function hasServiceLogin() + { + return isset($this->service_login); + } + + public function clearServiceLogin() + { + unset($this->service_login); + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @param string $var + * @return $this + */ + public function setServiceLogin($var) + { + GPBUtil::checkString($var, True); + $this->service_login = $var; + + return $this; + } + + /** + * The report database to be used for the SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @return string + */ + public function getReportDatabase() + { + return isset($this->report_database) ? $this->report_database : ''; + } + + public function hasReportDatabase() + { + return isset($this->report_database); + } + + public function clearReportDatabase() + { + unset($this->report_database); + } + + /** + * The report database to be used for the SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @param string $var + * @return $this + */ + public function setReportDatabase($var) + { + GPBUtil::checkString($var, True); + $this->report_database = $var; + + return $this; + } + + /** + * Lease duration needed for the SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Lease duration needed for the SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AdvancedMachineFeatures.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AdvancedMachineFeatures.php new file mode 100644 index 000000000000..48a96759a302 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/AdvancedMachineFeatures.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1beta4.AdvancedMachineFeatures + */ +class AdvancedMachineFeatures extends \Google\Protobuf\Internal\Message +{ + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + */ + protected $threads_per_core = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $threads_per_core + * The number of threads per physical core. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + * @return int + */ + public function getThreadsPerCore() + { + return $this->threads_per_core; + } + + /** + * The number of threads per physical core. + * + * Generated from protobuf field int32 threads_per_core = 1; + * @param int $var + * @return $this + */ + public function setThreadsPerCore($var) + { + GPBUtil::checkInt32($var); + $this->threads_per_core = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning.php new file mode 100644 index 000000000000..ddaa9c4e73f5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1beta4.ApiWarning + */ +class ApiWarning extends \Google\Protobuf\Internal\Message +{ + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ApiWarning.SqlApiWarningCode code = 1; + */ + protected $code = 0; + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Code to uniquely identify the warning type. + * @type string $message + * The warning message. + * @type string $region + * The region name for REGION_UNREACHABLE warning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ApiWarning.SqlApiWarningCode code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Code to uniquely identify the warning type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ApiWarning.SqlApiWarningCode code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\ApiWarning\SqlApiWarningCode::class); + $this->code = $var; + + return $this; + } + + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The warning message. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region name for REGION_UNREACHABLE warning. + * + * Generated from protobuf field string region = 3; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning/SqlApiWarningCode.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning/SqlApiWarningCode.php new file mode 100644 index 000000000000..7a35989dc5e0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ApiWarning/SqlApiWarningCode.php @@ -0,0 +1,80 @@ +google.cloud.sql.v1beta4.ApiWarning.SqlApiWarningCode + */ +class SqlApiWarningCode +{ + /** + * An unknown or unset warning type from Cloud SQL API. + * + * Generated from protobuf enum SQL_API_WARNING_CODE_UNSPECIFIED = 0; + */ + const SQL_API_WARNING_CODE_UNSPECIFIED = 0; + /** + * Warning when one or more regions are not reachable. The returned result + * set may be incomplete. + * + * Generated from protobuf enum REGION_UNREACHABLE = 1; + */ + const REGION_UNREACHABLE = 1; + /** + * Warning when user provided maxResults parameter exceeds the limit. The + * returned result set may be incomplete. + * + * Generated from protobuf enum MAX_RESULTS_EXCEEDS_LIMIT = 2; + */ + const MAX_RESULTS_EXCEEDS_LIMIT = 2; + /** + * Warning when user tries to create/update a user with credentials that + * have previously been compromised by a public data breach. + * + * Generated from protobuf enum COMPROMISED_CREDENTIALS = 3; + */ + const COMPROMISED_CREDENTIALS = 3; + /** + * Warning when the operation succeeds but some non-critical workflow state + * failed. + * + * Generated from protobuf enum INTERNAL_STATE_FAILURE = 4; + */ + const INTERNAL_STATE_FAILURE = 4; + + private static $valueToName = [ + self::SQL_API_WARNING_CODE_UNSPECIFIED => 'SQL_API_WARNING_CODE_UNSPECIFIED', + self::REGION_UNREACHABLE => 'REGION_UNREACHABLE', + self::MAX_RESULTS_EXCEEDS_LIMIT => 'MAX_RESULTS_EXCEEDS_LIMIT', + self::COMPROMISED_CREDENTIALS => 'COMPROMISED_CREDENTIALS', + self::INTERNAL_STATE_FAILURE => 'INTERNAL_STATE_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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlApiWarningCode::class, \Google\Cloud\Sql\V1beta4\ApiWarning_SqlApiWarningCode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration.php new file mode 100644 index 000000000000..0b06ef62600a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration.php @@ -0,0 +1,598 @@ +google.cloud.sql.v1beta4.BackupConfiguration + */ +class BackupConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + */ + protected $start_time = ''; + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + */ + protected $enabled = null; + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + */ + protected $binary_log_enabled = null; + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + */ + protected $replication_log_archiving_enabled = null; + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + */ + protected $location = ''; + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + */ + protected $point_in_time_recovery_enabled = null; + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + */ + protected $transaction_log_retention_days = null; + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings backup_retention_settings = 10; + */ + protected $backup_retention_settings = null; + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transactional_log_storage_state = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_time + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * @type \Google\Protobuf\BoolValue $enabled + * Whether this configuration is enabled. + * @type string $kind + * This is always `sql#backupConfiguration`. + * @type \Google\Protobuf\BoolValue $binary_log_enabled + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * @type \Google\Protobuf\BoolValue $replication_log_archiving_enabled + * Reserved for future use. + * @type string $location + * Location of the backup + * @type \Google\Protobuf\BoolValue $point_in_time_recovery_enabled + * Whether point in time recovery is enabled. + * @type \Google\Protobuf\Int32Value $transaction_log_retention_days + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * @type \Google\Cloud\Sql\V1beta4\BackupRetentionSettings $backup_retention_settings + * Backup retention settings. + * @type int $transactional_log_storage_state + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + * @return string + */ + public function getStartTime() + { + return $this->start_time; + } + + /** + * Start time for the daily backup configuration in UTC timezone in the 24 + * hour format - `HH:MM`. + * + * Generated from protobuf field string start_time = 1; + * @param string $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkString($var, True); + $this->start_time = $var; + + return $this; + } + + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnabled() + { + return $this->enabled; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Returns the unboxed value from getEnabled() + + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @return bool|null + */ + public function getEnabledUnwrapped() + { + return $this->readWrapperValue("enabled"); + } + + /** + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether this configuration is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 2; + * @param bool|null $var + * @return $this + */ + public function setEnabledUnwrapped($var) + { + $this->writeWrapperValue("enabled", $var); + return $this;} + + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupConfiguration`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getBinaryLogEnabled() + { + return $this->binary_log_enabled; + } + + public function hasBinaryLogEnabled() + { + return isset($this->binary_log_enabled); + } + + public function clearBinaryLogEnabled() + { + unset($this->binary_log_enabled); + } + + /** + * Returns the unboxed value from getBinaryLogEnabled() + + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @return bool|null + */ + public function getBinaryLogEnabledUnwrapped() + { + return $this->readWrapperValue("binary_log_enabled"); + } + + /** + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setBinaryLogEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->binary_log_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * (MySQL only) Whether binary log is enabled. If backup configuration is + * disabled, binarylog must be disabled as well. + * + * Generated from protobuf field .google.protobuf.BoolValue binary_log_enabled = 4; + * @param bool|null $var + * @return $this + */ + public function setBinaryLogEnabledUnwrapped($var) + { + $this->writeWrapperValue("binary_log_enabled", $var); + return $this;} + + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @return \Google\Protobuf\BoolValue|null + */ + public function getReplicationLogArchivingEnabled() + { + return $this->replication_log_archiving_enabled; + } + + public function hasReplicationLogArchivingEnabled() + { + return isset($this->replication_log_archiving_enabled); + } + + public function clearReplicationLogArchivingEnabled() + { + unset($this->replication_log_archiving_enabled); + } + + /** + * Returns the unboxed value from getReplicationLogArchivingEnabled() + + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @return bool|null + */ + public function getReplicationLogArchivingEnabledUnwrapped() + { + return $this->readWrapperValue("replication_log_archiving_enabled"); + } + + /** + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setReplicationLogArchivingEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->replication_log_archiving_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue replication_log_archiving_enabled = 5; + * @param bool|null $var + * @return $this + */ + public function setReplicationLogArchivingEnabledUnwrapped($var) + { + $this->writeWrapperValue("replication_log_archiving_enabled", $var); + return $this;} + + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the backup + * + * Generated from protobuf field string location = 6; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getPointInTimeRecoveryEnabled() + { + return $this->point_in_time_recovery_enabled; + } + + public function hasPointInTimeRecoveryEnabled() + { + return isset($this->point_in_time_recovery_enabled); + } + + public function clearPointInTimeRecoveryEnabled() + { + unset($this->point_in_time_recovery_enabled); + } + + /** + * Returns the unboxed value from getPointInTimeRecoveryEnabled() + + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @return bool|null + */ + public function getPointInTimeRecoveryEnabledUnwrapped() + { + return $this->readWrapperValue("point_in_time_recovery_enabled"); + } + + /** + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setPointInTimeRecoveryEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->point_in_time_recovery_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether point in time recovery is enabled. + * + * Generated from protobuf field .google.protobuf.BoolValue point_in_time_recovery_enabled = 7; + * @param bool|null $var + * @return $this + */ + public function setPointInTimeRecoveryEnabledUnwrapped($var) + { + $this->writeWrapperValue("point_in_time_recovery_enabled", $var); + return $this;} + + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @return \Google\Protobuf\Int32Value|null + */ + public function getTransactionLogRetentionDays() + { + return $this->transaction_log_retention_days; + } + + public function hasTransactionLogRetentionDays() + { + return isset($this->transaction_log_retention_days); + } + + public function clearTransactionLogRetentionDays() + { + unset($this->transaction_log_retention_days); + } + + /** + * Returns the unboxed value from getTransactionLogRetentionDays() + + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @return int|null + */ + public function getTransactionLogRetentionDaysUnwrapped() + { + return $this->readWrapperValue("transaction_log_retention_days"); + } + + /** + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setTransactionLogRetentionDays($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->transaction_log_retention_days = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The number of days of transaction logs we retain for point in time + * restore, from 1-7. + * + * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; + * @param int|null $var + * @return $this + */ + public function setTransactionLogRetentionDaysUnwrapped($var) + { + $this->writeWrapperValue("transaction_log_retention_days", $var); + return $this;} + + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings backup_retention_settings = 10; + * @return \Google\Cloud\Sql\V1beta4\BackupRetentionSettings|null + */ + public function getBackupRetentionSettings() + { + return $this->backup_retention_settings; + } + + public function hasBackupRetentionSettings() + { + return isset($this->backup_retention_settings); + } + + public function clearBackupRetentionSettings() + { + unset($this->backup_retention_settings); + } + + /** + * Backup retention settings. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings backup_retention_settings = 10; + * @param \Google\Cloud\Sql\V1beta4\BackupRetentionSettings $var + * @return $this + */ + public function setBackupRetentionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\BackupRetentionSettings::class); + $this->backup_retention_settings = $var; + + return $this; + } + + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0; + } + + public function hasTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state); + } + + public function clearTransactionalLogStorageState() + { + unset($this->transactional_log_storage_state); + } + + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransactionalLogStorageState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BackupConfiguration\TransactionalLogStorageState::class); + $this->transactional_log_storage_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration/TransactionalLogStorageState.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration/TransactionalLogStorageState.php new file mode 100644 index 000000000000..9f5125b47358 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupConfiguration/TransactionalLogStorageState.php @@ -0,0 +1,81 @@ +google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState + */ +class TransactionalLogStorageState +{ + /** + * Unspecified. + * + * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + */ + const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + /** + * The transaction logs for the instance are stored on a data disk. + * + * Generated from protobuf enum DISK = 1; + */ + const DISK = 1; + /** + * The transaction logs for the instance are switching from being stored on + * a data disk to being stored in Cloud Storage. + * + * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2; + */ + const SWITCHING_TO_CLOUD_STORAGE = 2; + /** + * The transaction logs for the instance are now stored in Cloud Storage. + * Previously, they were stored on a data disk. + * + * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3; + */ + const SWITCHED_TO_CLOUD_STORAGE = 3; + /** + * The transaction logs for the instance are stored in Cloud Storage. + * + * Generated from protobuf enum CLOUD_STORAGE = 4; + */ + const CLOUD_STORAGE = 4; + + private static $valueToName = [ + self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', + self::DISK => 'DISK', + self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE', + self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TransactionalLogStorageState::class, \Google\Cloud\Sql\V1beta4\BackupConfiguration_TransactionalLogStorageState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupContext.php new file mode 100644 index 000000000000..da33b34fb49d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupContext.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.BackupContext + */ +class BackupContext extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + */ + protected $backup_id = 0; + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $backup_id + * The identifier of the backup. + * @type string $kind + * This is always `sql#backupContext`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + * @return int|string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * The identifier of the backup. + * + * Generated from protobuf field int64 backup_id = 1; + * @param int|string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkInt64($var); + $this->backup_id = $var; + + return $this; + } + + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupContext`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig.php new file mode 100644 index 000000000000..9f03d432711e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig.php @@ -0,0 +1,121 @@ +google.cloud.sql.v1beta4.BackupReencryptionConfig + */ +class BackupReencryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + */ + protected $backup_limit = null; + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupReencryptionConfig.BackupType backup_type = 2; + */ + protected $backup_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $backup_limit + * Backup re-encryption limit + * @type int $backup_type + * Type of backups users want to re-encrypt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + * @return int + */ + public function getBackupLimit() + { + return isset($this->backup_limit) ? $this->backup_limit : 0; + } + + public function hasBackupLimit() + { + return isset($this->backup_limit); + } + + public function clearBackupLimit() + { + unset($this->backup_limit); + } + + /** + * Backup re-encryption limit + * + * Generated from protobuf field optional int32 backup_limit = 1; + * @param int $var + * @return $this + */ + public function setBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->backup_limit = $var; + + return $this; + } + + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupReencryptionConfig.BackupType backup_type = 2; + * @return int + */ + public function getBackupType() + { + return isset($this->backup_type) ? $this->backup_type : 0; + } + + public function hasBackupType() + { + return isset($this->backup_type); + } + + public function clearBackupType() + { + unset($this->backup_type); + } + + /** + * Type of backups users want to re-encrypt. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupReencryptionConfig.BackupType backup_type = 2; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BackupReencryptionConfig\BackupType::class); + $this->backup_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig/BackupType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig/BackupType.php new file mode 100644 index 000000000000..f46867d9ff5c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupReencryptionConfig/BackupType.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1beta4.BackupReencryptionConfig.BackupType + */ +class BackupType +{ + /** + * Unknown backup type, will be defaulted to AUTOMATIC backup type + * + * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; + */ + const BACKUP_TYPE_UNSPECIFIED = 0; + /** + * Reencrypt automatic backups + * + * Generated from protobuf enum AUTOMATED = 1; + */ + const AUTOMATED = 1; + /** + * Reencrypt on-demand backups + * + * Generated from protobuf enum ON_DEMAND = 2; + */ + const ON_DEMAND = 2; + + private static $valueToName = [ + self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', + self::AUTOMATED => 'AUTOMATED', + self::ON_DEMAND => 'ON_DEMAND', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackupType::class, \Google\Cloud\Sql\V1beta4\BackupReencryptionConfig_BackupType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings.php new file mode 100644 index 000000000000..e66f1ef3024d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings.php @@ -0,0 +1,151 @@ +google.cloud.sql.v1beta4.BackupRetentionSettings + */ +class BackupRetentionSettings extends \Google\Protobuf\Internal\Message +{ + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings.RetentionUnit retention_unit = 1; + */ + protected $retention_unit = 0; + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + */ + protected $retained_backups = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $retention_unit + * The unit that 'retained_backups' represents. + * @type \Google\Protobuf\Int32Value $retained_backups + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings.RetentionUnit retention_unit = 1; + * @return int + */ + public function getRetentionUnit() + { + return $this->retention_unit; + } + + /** + * The unit that 'retained_backups' represents. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings.RetentionUnit retention_unit = 1; + * @param int $var + * @return $this + */ + public function setRetentionUnit($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BackupRetentionSettings\RetentionUnit::class); + $this->retention_unit = $var; + + return $this; + } + + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getRetainedBackups() + { + return $this->retained_backups; + } + + public function hasRetainedBackups() + { + return isset($this->retained_backups); + } + + public function clearRetainedBackups() + { + unset($this->retained_backups); + } + + /** + * Returns the unboxed value from getRetainedBackups() + + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @return int|null + */ + public function getRetainedBackupsUnwrapped() + { + return $this->readWrapperValue("retained_backups"); + } + + /** + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setRetainedBackups($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->retained_backups = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Depending on the value of retention_unit, this is used to determine + * if a backup needs to be deleted. If retention_unit is 'COUNT', we will + * retain this many backups. + * + * Generated from protobuf field .google.protobuf.Int32Value retained_backups = 2; + * @param int|null $var + * @return $this + */ + public function setRetainedBackupsUnwrapped($var) + { + $this->writeWrapperValue("retained_backups", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings/RetentionUnit.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings/RetentionUnit.php new file mode 100644 index 000000000000..858a8921b72a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRetentionSettings/RetentionUnit.php @@ -0,0 +1,57 @@ +google.cloud.sql.v1beta4.BackupRetentionSettings.RetentionUnit + */ +class RetentionUnit +{ + /** + * Backup retention unit is unspecified, will be treated as COUNT. + * + * Generated from protobuf enum RETENTION_UNIT_UNSPECIFIED = 0; + */ + const RETENTION_UNIT_UNSPECIFIED = 0; + /** + * Retention will be by count, eg. "retain the most recent 7 backups". + * + * Generated from protobuf enum COUNT = 1; + */ + const COUNT = 1; + + private static $valueToName = [ + self::RETENTION_UNIT_UNSPECIFIED => 'RETENTION_UNIT_UNSPECIFIED', + self::COUNT => 'COUNT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetentionUnit::class, \Google\Cloud\Sql\V1beta4\BackupRetentionSettings_RetentionUnit::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRun.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRun.php new file mode 100644 index 000000000000..595dc3994852 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRun.php @@ -0,0 +1,733 @@ +google.cloud.sql.v1beta4.BackupRun + */ +class BackupRun extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupRunStatus status = 2; + */ + protected $status = 0; + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + */ + protected $enqueued_time = null; + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + */ + protected $id = 0; + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + */ + protected $start_time = null; + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OperationError error = 7; + */ + protected $error = null; + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupRunType type = 8; + */ + protected $type = 0; + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + */ + protected $description = ''; + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + */ + protected $window_start_time = null; + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + */ + protected $self_link = ''; + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + */ + protected $location = ''; + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionConfiguration disk_encryption_configuration = 16; + */ + protected $disk_encryption_configuration = null; + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionStatus disk_encryption_status = 17; + */ + protected $disk_encryption_status = null; + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupKind backup_kind = 19; + */ + protected $backup_kind = 0; + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + */ + protected $time_zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#backupRun`. + * @type int $status + * The status of this run. + * @type \Google\Protobuf\Timestamp $enqueued_time + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type int|string $id + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * @type \Google\Protobuf\Timestamp $start_time + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $end_time + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Cloud\Sql\V1beta4\OperationError $error + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * @type int $type + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * @type string $description + * The description of this run, only applicable to on-demand backups. + * @type \Google\Protobuf\Timestamp $window_start_time + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * @type string $instance + * Name of the database instance. + * @type string $self_link + * The URI of this resource. + * @type string $location + * Location of the backups. + * @type \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration $disk_encryption_configuration + * Encryption configuration specific to a backup. + * @type \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus $disk_encryption_status + * Encryption status specific to a backup. + * @type int $backup_kind + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * @type string $time_zone + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupRun`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupRunStatus status = 2; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of this run. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupRunStatus status = 2; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlBackupRunStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEnqueuedTime() + { + return $this->enqueued_time; + } + + public function hasEnqueuedTime() + { + return isset($this->enqueued_time); + } + + public function clearEnqueuedTime() + { + unset($this->enqueued_time); + } + + /** + * The time the run was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp enqueued_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEnqueuedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->enqueued_time = $var; + + return $this; + } + + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The identifier for this backup run. Unique only for a specific Cloud SQL + * instance. + * + * Generated from protobuf field int64 id = 4; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @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); + } + + /** + * The time the backup operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @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); + } + + /** + * The time the backup operation completed in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OperationError error = 7; + * @return \Google\Cloud\Sql\V1beta4\OperationError|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Information about why the backup operation failed. This is only present if + * the run has the FAILED status. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OperationError error = 7; + * @param \Google\Cloud\Sql\V1beta4\OperationError $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\OperationError::class); + $this->error = $var; + + return $this; + } + + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupRunType type = 8; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this run; can be either "AUTOMATED" or "ON_DEMAND" or "FINAL". + * This field defaults to "ON_DEMAND" and is ignored, when specified for + * insert requests. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupRunType type = 8; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlBackupRunType::class); + $this->type = $var; + + return $this; + } + + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of this run, only applicable to on-demand backups. + * + * Generated from protobuf field string description = 9; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getWindowStartTime() + { + return $this->window_start_time; + } + + public function hasWindowStartTime() + { + return isset($this->window_start_time); + } + + public function clearWindowStartTime() + { + unset($this->window_start_time); + } + + /** + * The start time of the backup window during which this the backup was + * attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp window_start_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setWindowStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->window_start_time = $var; + + return $this; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 11; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 12; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location of the backups. + * + * Generated from protobuf field string location = 13; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionConfiguration disk_encryption_configuration = 16; + * @return \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration|null + */ + public function getDiskEncryptionConfiguration() + { + return $this->disk_encryption_configuration; + } + + public function hasDiskEncryptionConfiguration() + { + return isset($this->disk_encryption_configuration); + } + + public function clearDiskEncryptionConfiguration() + { + unset($this->disk_encryption_configuration); + } + + /** + * Encryption configuration specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionConfiguration disk_encryption_configuration = 16; + * @param \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration $var + * @return $this + */ + public function setDiskEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration::class); + $this->disk_encryption_configuration = $var; + + return $this; + } + + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionStatus disk_encryption_status = 17; + * @return \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus|null + */ + public function getDiskEncryptionStatus() + { + return $this->disk_encryption_status; + } + + public function hasDiskEncryptionStatus() + { + return isset($this->disk_encryption_status); + } + + public function clearDiskEncryptionStatus() + { + unset($this->disk_encryption_status); + } + + /** + * Encryption status specific to a backup. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionStatus disk_encryption_status = 17; + * @param \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus $var + * @return $this + */ + public function setDiskEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus::class); + $this->disk_encryption_status = $var; + + return $this; + } + + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupKind backup_kind = 19; + * @return int + */ + public function getBackupKind() + { + return $this->backup_kind; + } + + /** + * Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackupKind backup_kind = 19; + * @param int $var + * @return $this + */ + public function setBackupKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlBackupKind::class); + $this->backup_kind = $var; + + return $this; + } + + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Backup time zone to prevent restores to an instance with + * a different time zone. Now relevant only for SQL Server. + * + * Generated from protobuf field string time_zone = 23; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRunsListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRunsListResponse.php new file mode 100644 index 000000000000..30ce78329cc9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BackupRunsListResponse.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1beta4.BackupRunsListResponse + */ +class BackupRunsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.BackupRun items = 2; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#backupRunsList`. + * @type array<\Google\Cloud\Sql\V1beta4\BackupRun>|\Google\Protobuf\Internal\RepeatedField $items + * A list of backup runs in reverse chronological order of the enqueued time. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#backupRunsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.BackupRun items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of backup runs in reverse chronological order of the enqueued time. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.BackupRun items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\BackupRun>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\BackupRun::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BakType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BakType.php new file mode 100644 index 000000000000..c237b0afdb9b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BakType.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1beta4.BakType + */ +class BakType +{ + /** + * Default type. + * + * Generated from protobuf enum BAK_TYPE_UNSPECIFIED = 0; + */ + const BAK_TYPE_UNSPECIFIED = 0; + /** + * Full backup. + * + * Generated from protobuf enum FULL = 1; + */ + const FULL = 1; + /** + * Differential backup. + * + * Generated from protobuf enum DIFF = 2; + */ + const DIFF = 2; + /** + * SQL Server Transaction Log + * + * Generated from protobuf enum TLOG = 3; + */ + const TLOG = 3; + + private static $valueToName = [ + self::BAK_TYPE_UNSPECIFIED => 'BAK_TYPE_UNSPECIFIED', + self::FULL => 'FULL', + self::DIFF => 'DIFF', + self::TLOG => 'TLOG', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BinLogCoordinates.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BinLogCoordinates.php new file mode 100644 index 000000000000..52d7709cff07 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/BinLogCoordinates.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1beta4.BinLogCoordinates + */ +class BinLogCoordinates extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + */ + protected $bin_log_file_name = ''; + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + */ + protected $bin_log_position = 0; + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bin_log_file_name + * Name of the binary log file for a Cloud SQL instance. + * @type int|string $bin_log_position + * Position (offset) within the binary log file. + * @type string $kind + * This is always `sql#binLogCoordinates`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + * @return string + */ + public function getBinLogFileName() + { + return $this->bin_log_file_name; + } + + /** + * Name of the binary log file for a Cloud SQL instance. + * + * Generated from protobuf field string bin_log_file_name = 1; + * @param string $var + * @return $this + */ + public function setBinLogFileName($var) + { + GPBUtil::checkString($var, True); + $this->bin_log_file_name = $var; + + return $this; + } + + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + * @return int|string + */ + public function getBinLogPosition() + { + return $this->bin_log_position; + } + + /** + * Position (offset) within the binary log file. + * + * Generated from protobuf field int64 bin_log_position = 2; + * @param int|string $var + * @return $this + */ + public function setBinLogPosition($var) + { + GPBUtil::checkInt64($var); + $this->bin_log_position = $var; + + return $this; + } + + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#binLogCoordinates`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/CloneContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/CloneContext.php new file mode 100644 index 000000000000..f6cdba97c963 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/CloneContext.php @@ -0,0 +1,383 @@ +google.cloud.sql.v1beta4.CloneContext + */ +class CloneContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + */ + protected $pitr_timestamp_ms = 0; + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + */ + protected $destination_instance_name = ''; + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BinLogCoordinates bin_log_coordinates = 4; + */ + protected $bin_log_coordinates = null; + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + */ + protected $point_in_time = null; + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + */ + protected $allocated_ip_range = ''; + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + */ + private $database_names; + /** + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preferred_zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#cloneContext`. + * @type int|string $pitr_timestamp_ms + * Reserved for future use. + * @type string $destination_instance_name + * Name of the Cloud SQL instance to be created as a clone. + * @type \Google\Cloud\Sql\V1beta4\BinLogCoordinates $bin_log_coordinates + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * @type \Google\Protobuf\Timestamp $point_in_time + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * @type string $allocated_ip_range + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * @type array|\Google\Protobuf\Internal\RepeatedField $database_names + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * @type string $preferred_zone + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#cloneContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + * @return int|string + */ + public function getPitrTimestampMs() + { + return $this->pitr_timestamp_ms; + } + + /** + * Reserved for future use. + * + * Generated from protobuf field int64 pitr_timestamp_ms = 2; + * @param int|string $var + * @return $this + */ + public function setPitrTimestampMs($var) + { + GPBUtil::checkInt64($var); + $this->pitr_timestamp_ms = $var; + + return $this; + } + + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + * @return string + */ + public function getDestinationInstanceName() + { + return $this->destination_instance_name; + } + + /** + * Name of the Cloud SQL instance to be created as a clone. + * + * Generated from protobuf field string destination_instance_name = 3; + * @param string $var + * @return $this + */ + public function setDestinationInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->destination_instance_name = $var; + + return $this; + } + + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BinLogCoordinates bin_log_coordinates = 4; + * @return \Google\Cloud\Sql\V1beta4\BinLogCoordinates|null + */ + public function getBinLogCoordinates() + { + return $this->bin_log_coordinates; + } + + public function hasBinLogCoordinates() + { + return isset($this->bin_log_coordinates); + } + + public function clearBinLogCoordinates() + { + unset($this->bin_log_coordinates); + } + + /** + * Binary log coordinates, if specified, identify the position up to which the + * source instance is cloned. If not specified, the source instance is + * cloned up to the most recent binary log coordinates. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BinLogCoordinates bin_log_coordinates = 4; + * @param \Google\Cloud\Sql\V1beta4\BinLogCoordinates $var + * @return $this + */ + public function setBinLogCoordinates($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\BinLogCoordinates::class); + $this->bin_log_coordinates = $var; + + return $this; + } + + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPointInTime() + { + return $this->point_in_time; + } + + public function hasPointInTime() + { + return isset($this->point_in_time); + } + + public function clearPointInTime() + { + unset($this->point_in_time); + } + + /** + * Timestamp, if specified, identifies the time to which the source instance + * is cloned. + * + * Generated from protobuf field .google.protobuf.Timestamp point_in_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPointInTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->point_in_time = $var; + + return $this; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + * @return string + */ + public function getAllocatedIpRange() + { + return $this->allocated_ip_range; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the cloned instance + * ip will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * [a-z]([-a-z0-9]*[a-z0-9])?. + * Reserved for future use. + * + * Generated from protobuf field string allocated_ip_range = 6; + * @param string $var + * @return $this + */ + public function setAllocatedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->allocated_ip_range = $var; + + return $this; + } + + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabaseNames() + { + return $this->database_names; + } + + /** + * (SQL Server only) Clone only the specified databases from the source + * instance. Clone all databases if empty. + * + * Generated from protobuf field repeated string database_names = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabaseNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->database_names = $arr; + + return $this; + } + + /** + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPreferredZone() + { + return isset($this->preferred_zone) ? $this->preferred_zone : ''; + } + + public function hasPreferredZone() + { + return isset($this->preferred_zone); + } + + public function clearPreferredZone() + { + unset($this->preferred_zone); + } + + /** + * Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance + * in the specified zone. If no zone is specified, clone to the same zone as + * the source instance. + * + * Generated from protobuf field optional string preferred_zone = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPreferredZone($var) + { + GPBUtil::checkString($var, True); + $this->preferred_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ConnectSettings.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ConnectSettings.php new file mode 100644 index 000000000000..a15d68493510 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ConnectSettings.php @@ -0,0 +1,371 @@ +google.cloud.sql.v1beta4.ConnectSettings + */ +class ConnectSettings extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 2; + */ + protected $server_ca_cert = null; + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.IpMapping ip_addresses = 3; + */ + private $ip_addresses; + /** + * The cloud region for the instance. e.g. `us-central1`, `europe-west1`. + * The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + */ + protected $region = ''; + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDatabaseVersion database_version = 31; + */ + protected $database_version = 0; + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackendType backend_type = 32; + */ + protected $backend_type = 0; + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + */ + protected $psc_enabled = false; + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + */ + protected $dns_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#connectSettings`. + * @type \Google\Cloud\Sql\V1beta4\SslCert $server_ca_cert + * SSL configuration. + * @type array<\Google\Cloud\Sql\V1beta4\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * The assigned IP addresses for the instance. + * @type string $region + * The cloud region for the instance. e.g. `us-central1`, `europe-west1`. + * The region cannot be changed after instance creation. + * @type int $database_version + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * @type int $backend_type + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * @type bool $psc_enabled + * Whether PSC connectivity is enabled for this instance. + * @type string $dns_name + * The dns name of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#connectSettings`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 2; + * @return \Google\Cloud\Sql\V1beta4\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 2; + * @param \Google\Cloud\Sql\V1beta4\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.IpMapping ip_addresses = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.IpMapping ip_addresses = 3; + * @param array<\Google\Cloud\Sql\V1beta4\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\IpMapping::class); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * The cloud region for the instance. e.g. `us-central1`, `europe-west1`. + * The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The cloud region for the instance. e.g. `us-central1`, `europe-west1`. + * The region cannot be changed after instance creation. + * + * Generated from protobuf field string region = 4; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDatabaseVersion database_version = 31; + * @return int + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * The database engine type and version. The `databaseVersion` + * field cannot be changed after instance creation. + * MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), + * or `MYSQL_5_6`. + * PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. + * SQL Server instances: `SQLSERVER_2017_STANDARD` (default), + * `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, + * `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDatabaseVersion database_version = 31; + * @param int $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlDatabaseVersion::class); + $this->database_version = $var; + + return $this; + } + + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackendType backend_type = 32; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackendType backend_type = 32; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlBackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + * @return bool + */ + public function getPscEnabled() + { + return $this->psc_enabled; + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field bool psc_enabled = 33; + * @param bool $var + * @return $this + */ + public function setPscEnabled($var) + { + GPBUtil::checkBool($var); + $this->psc_enabled = $var; + + return $this; + } + + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + * @return string + */ + public function getDnsName() + { + return $this->dns_name; + } + + /** + * The dns name of the instance. + * + * Generated from protobuf field string dns_name = 34; + * @param string $var + * @return $this + */ + public function setDnsName($var) + { + GPBUtil::checkString($var, True); + $this->dns_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DataCacheConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DataCacheConfig.php new file mode 100644 index 000000000000..95cc34c9ca75 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DataCacheConfig.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1beta4.DataCacheConfig + */ +class DataCacheConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + */ + protected $data_cache_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $data_cache_enabled + * Whether data cache is enabled for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + * @return bool + */ + public function getDataCacheEnabled() + { + return $this->data_cache_enabled; + } + + /** + * Whether data cache is enabled for the instance. + * + * Generated from protobuf field bool data_cache_enabled = 1; + * @param bool $var + * @return $this + */ + public function setDataCacheEnabled($var) + { + GPBUtil::checkBool($var); + $this->data_cache_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Database.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Database.php new file mode 100644 index 000000000000..2bc71cf0248d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Database.php @@ -0,0 +1,354 @@ +google.cloud.sql.v1beta4.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + */ + protected $charset = ''; + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + */ + protected $collation = ''; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + */ + protected $etag = ''; + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + */ + protected $name = ''; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + */ + protected $self_link = ''; + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + */ + protected $project = ''; + protected $database_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#database`. + * @type string $charset + * The Cloud SQL charset value. + * @type string $collation + * The Cloud SQL collation value. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. + * @type string $name + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * @type string $instance + * The name of the Cloud SQL instance. This does not include the project ID. + * @type string $self_link + * The URI of this resource. + * @type string $project + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * @type \Google\Cloud\Sql\V1beta4\SqlServerDatabaseDetails $sqlserver_database_details + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#database`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + * @return string + */ + public function getCharset() + { + return $this->charset; + } + + /** + * The Cloud SQL charset value. + * + * Generated from protobuf field string charset = 2; + * @param string $var + * @return $this + */ + public function setCharset($var) + { + GPBUtil::checkString($var, True); + $this->charset = $var; + + return $this; + } + + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * The Cloud SQL collation value. + * + * Generated from protobuf field string collation = 3; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 4; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the database in the Cloud SQL instance. This does not include + * the project ID or instance name. + * + * Generated from protobuf field string name = 5; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string instance = 6; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 7; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 8; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerDatabaseDetails sqlserver_database_details = 9; + * @return \Google\Cloud\Sql\V1beta4\SqlServerDatabaseDetails|null + */ + public function getSqlserverDatabaseDetails() + { + return $this->readOneof(9); + } + + public function hasSqlserverDatabaseDetails() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerDatabaseDetails sqlserver_database_details = 9; + * @param \Google\Cloud\Sql\V1beta4\SqlServerDatabaseDetails $var + * @return $this + */ + public function setSqlserverDatabaseDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SqlServerDatabaseDetails::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getDatabaseDetails() + { + return $this->whichOneof("database_details"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseFlags.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseFlags.php new file mode 100644 index 000000000000..61b3a307543b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseFlags.php @@ -0,0 +1,125 @@ +google.cloud.sql.v1beta4.DatabaseFlags + */ +class DatabaseFlags extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * @type string $value + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the flag. These flags are passed at instance startup, so + * include both server options and system variables. Flags are + * specified with underscores, not hyphens. For more information, see + * [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) + * in the Cloud SQL documentation. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the flag. Boolean flags are set to `on` for true + * and `off` for false. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance.php new file mode 100644 index 000000000000..d62b0a2ea82b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance.php @@ -0,0 +1,1976 @@ +google.cloud.sql.v1beta4.DatabaseInstance + */ +class DatabaseInstance extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlInstanceState state = 2; + */ + protected $state = 0; + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDatabaseVersion database_version = 3; + */ + protected $database_version = 0; + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings settings = 4; + */ + protected $settings = null; + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + */ + protected $etag = ''; + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + */ + protected $failover_replica = null; + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + */ + protected $master_instance_name = ''; + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + */ + private $replica_names; + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @deprecated + */ + protected $max_disk_size = null; + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @deprecated + */ + protected $current_disk_size = null; + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.IpMapping ip_addresses = 11; + */ + private $ip_addresses; + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 12; + */ + protected $server_ca_cert = null; + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstanceType instance_type = 13; + */ + protected $instance_type = 0; + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + */ + protected $project = ''; + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @deprecated + */ + protected $ipv6_address = ''; + /** + * The service account email address assigned to the instance. \This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + */ + protected $service_account_email_address = ''; + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OnPremisesConfiguration on_premises_configuration = 17; + */ + protected $on_premises_configuration = null; + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ReplicaConfiguration replica_configuration = 18; + */ + protected $replica_configuration = null; + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackendType backend_type = 19; + */ + protected $backend_type = 0; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + */ + protected $self_link = ''; + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlSuspensionReason suspension_reason = 21; + */ + private $suspension_reason; + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + */ + protected $connection_name = ''; + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + */ + protected $name = ''; + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + */ + protected $region = ''; + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + */ + protected $gce_zone = ''; + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + */ + protected $secondary_gce_zone = ''; + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionConfiguration disk_encryption_configuration = 26; + */ + protected $disk_encryption_configuration = null; + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionStatus disk_encryption_status = 27; + */ + protected $disk_encryption_status = null; + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + */ + protected $root_password = ''; + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + */ + protected $scheduled_maintenance = null; + /** + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + */ + protected $satisfies_pzs = null; + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_installed_version = ''; + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + */ + protected $out_of_disk_report = null; + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_maintenance_versions; + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + */ + protected $maintenance_version = ''; + /** + * The SQL network architecture for the instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + */ + protected $sql_network_architecture = null; + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_service_attachment_link = null; + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dns_name = null; + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $primary_dns_name = null; + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $write_endpoint = null; + /** + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54; + */ + protected $replication_cluster = null; + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55; + */ + protected $gemini_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#instance`. + * @type int $state + * The current serving state of the Cloud SQL instance. + * @type int $database_version + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * @type \Google\Cloud\Sql\V1beta4\Settings $settings + * The user settings. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * @type \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlFailoverReplica $failover_replica + * The name and status of the failover replica. + * @type string $master_instance_name + * The name of the instance which will act as primary in the replication + * setup. + * @type array|\Google\Protobuf\Internal\RepeatedField $replica_names + * The replicas of the instance. + * @type \Google\Protobuf\Int64Value $max_disk_size + * The maximum disk size of the instance in bytes. + * @type \Google\Protobuf\Int64Value $current_disk_size + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * @type array<\Google\Cloud\Sql\V1beta4\IpMapping>|\Google\Protobuf\Internal\RepeatedField $ip_addresses + * The assigned IP addresses for the instance. + * @type \Google\Cloud\Sql\V1beta4\SslCert $server_ca_cert + * SSL configuration. + * @type int $instance_type + * The instance type. + * @type string $project + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * @type string $ipv6_address + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * @type string $service_account_email_address + * The service account email address assigned to the instance. \This + * property is read-only. + * @type \Google\Cloud\Sql\V1beta4\OnPremisesConfiguration $on_premises_configuration + * Configuration specific to on-premises instances. + * @type \Google\Cloud\Sql\V1beta4\ReplicaConfiguration $replica_configuration + * Configuration specific to failover replicas and read replicas. + * @type int $backend_type + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * @type string $self_link + * The URI of this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $suspension_reason + * If the instance state is SUSPENDED, the reason for the suspension. + * @type string $connection_name + * Connection name of the Cloud SQL instance used in connection strings. + * @type string $name + * Name of the Cloud SQL instance. This does not include the project ID. + * @type string $region + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * @type string $gce_zone + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * @type string $secondary_gce_zone + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * @type \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration $disk_encryption_configuration + * Disk encryption configuration specific to an instance. + * @type \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus $disk_encryption_status + * Disk encryption status specific to an instance. + * @type string $root_password + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * @type \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlScheduledMaintenance $scheduled_maintenance + * The start time of any upcoming scheduled maintenance for this instance. + * @type \Google\Protobuf\BoolValue $satisfies_pzs + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * @type string $database_installed_version + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * @type \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlOutOfDiskReport $out_of_disk_report + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_maintenance_versions + * Output only. List all maintenance versions applicable on the instance + * @type string $maintenance_version + * The current software version on the instance. + * @type int $sql_network_architecture + * The SQL network architecture for the instance. + * @type string $psc_service_attachment_link + * Output only. The link to service attachment of PSC instance. + * @type string $dns_name + * Output only. The dns name of the instance. + * @type string $primary_dns_name + * Output only. DEPRECATED: please use write_endpoint instead. + * @type string $write_endpoint + * Output only. The dns name of the primary instance in a replication group. + * @type \Google\Cloud\Sql\V1beta4\ReplicationCluster $replication_cluster + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * @type \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig $gemini_config + * Gemini instance configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instance`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlInstanceState state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current serving state of the Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlInstanceState state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlInstanceState::class); + $this->state = $var; + + return $this; + } + + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDatabaseVersion database_version = 3; + * @return int + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * The database engine type and version. The `databaseVersion` field cannot + * be changed after instance creation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDatabaseVersion database_version = 3; + * @param int $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlDatabaseVersion::class); + $this->database_version = $var; + + return $this; + } + + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings settings = 4; + * @return \Google\Cloud\Sql\V1beta4\Settings|null + */ + public function getSettings() + { + return $this->settings; + } + + public function hasSettings() + { + return isset($this->settings); + } + + public function clearSettings() + { + unset($this->settings); + } + + /** + * The user settings. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings settings = 4; + * @param \Google\Cloud\Sql\V1beta4\Settings $var + * @return $this + */ + public function setSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\Settings::class); + $this->settings = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. Use the `settings.settingsVersion` field instead. + * + * Generated from protobuf field string etag = 5; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + * @return \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlFailoverReplica|null + */ + public function getFailoverReplica() + { + return $this->failover_replica; + } + + public function hasFailoverReplica() + { + return isset($this->failover_replica); + } + + public function clearFailoverReplica() + { + unset($this->failover_replica); + } + + /** + * The name and status of the failover replica. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlFailoverReplica failover_replica = 6; + * @param \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlFailoverReplica $var + * @return $this + */ + public function setFailoverReplica($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlFailoverReplica::class); + $this->failover_replica = $var; + + return $this; + } + + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + * @return string + */ + public function getMasterInstanceName() + { + return $this->master_instance_name; + } + + /** + * The name of the instance which will act as primary in the replication + * setup. + * + * Generated from protobuf field string master_instance_name = 7; + * @param string $var + * @return $this + */ + public function setMasterInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->master_instance_name = $var; + + return $this; + } + + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicaNames() + { + return $this->replica_names; + } + + /** + * The replicas of the instance. + * + * Generated from protobuf field repeated string replica_names = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicaNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->replica_names = $arr; + + return $this; + } + + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @return \Google\Protobuf\Int64Value|null + * @deprecated + */ + public function getMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->max_disk_size; + } + + public function hasMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return isset($this->max_disk_size); + } + + public function clearMaxDiskSize() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + unset($this->max_disk_size); + } + + /** + * Returns the unboxed value from getMaxDiskSize() + + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @return int|string|null + */ + public function getMaxDiskSizeUnwrapped() + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("max_disk_size"); + } + + /** + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + * @deprecated + */ + public function setMaxDiskSize($var) + { + @trigger_error('max_disk_size is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_disk_size = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The maximum disk size of the instance in bytes. + * + * Generated from protobuf field .google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; + * @param int|string|null $var + * @return $this + */ + public function setMaxDiskSizeUnwrapped($var) + { + $this->writeWrapperValue("max_disk_size", $var); + return $this;} + + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @return \Google\Protobuf\Int64Value|null + * @deprecated + */ + public function getCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->current_disk_size; + } + + public function hasCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return isset($this->current_disk_size); + } + + public function clearCurrentDiskSize() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + unset($this->current_disk_size); + } + + /** + * Returns the unboxed value from getCurrentDiskSize() + + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @return int|string|null + */ + public function getCurrentDiskSizeUnwrapped() + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("current_disk_size"); + } + + /** + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + * @deprecated + */ + public function setCurrentDiskSize($var) + { + @trigger_error('current_disk_size is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->current_disk_size = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The current disk usage of the instance in bytes. This property has been + * deprecated. Use the + * "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud + * Monitoring API instead. Please see [this + * announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) + * for details. + * + * Generated from protobuf field .google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; + * @param int|string|null $var + * @return $this + */ + public function setCurrentDiskSizeUnwrapped($var) + { + $this->writeWrapperValue("current_disk_size", $var); + return $this;} + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.IpMapping ip_addresses = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpAddresses() + { + return $this->ip_addresses; + } + + /** + * The assigned IP addresses for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.IpMapping ip_addresses = 11; + * @param array<\Google\Cloud\Sql\V1beta4\IpMapping>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\IpMapping::class); + $this->ip_addresses = $arr; + + return $this; + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 12; + * @return \Google\Cloud\Sql\V1beta4\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * SSL configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 12; + * @param \Google\Cloud\Sql\V1beta4\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstanceType instance_type = 13; + * @return int + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * The instance type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstanceType instance_type = 13; + * @param int $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstanceType::class); + $this->instance_type = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL instance. The Google + * apps domain is prefixed if applicable. + * + * Generated from protobuf field string project = 14; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @return string + * @deprecated + */ + public function getIpv6Address() + { + @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); + return $this->ipv6_address; + } + + /** + * The IPv6 address assigned to the instance. + * (Deprecated) This property was applicable only + * to First Generation instances. + * + * Generated from protobuf field string ipv6_address = 15 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setIpv6Address($var) + { + @trigger_error('ipv6_address is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->ipv6_address = $var; + + return $this; + } + + /** + * The service account email address assigned to the instance. \This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + * @return string + */ + public function getServiceAccountEmailAddress() + { + return $this->service_account_email_address; + } + + /** + * The service account email address assigned to the instance. \This + * property is read-only. + * + * Generated from protobuf field string service_account_email_address = 16; + * @param string $var + * @return $this + */ + public function setServiceAccountEmailAddress($var) + { + GPBUtil::checkString($var, True); + $this->service_account_email_address = $var; + + return $this; + } + + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OnPremisesConfiguration on_premises_configuration = 17; + * @return \Google\Cloud\Sql\V1beta4\OnPremisesConfiguration|null + */ + public function getOnPremisesConfiguration() + { + return $this->on_premises_configuration; + } + + public function hasOnPremisesConfiguration() + { + return isset($this->on_premises_configuration); + } + + public function clearOnPremisesConfiguration() + { + unset($this->on_premises_configuration); + } + + /** + * Configuration specific to on-premises instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OnPremisesConfiguration on_premises_configuration = 17; + * @param \Google\Cloud\Sql\V1beta4\OnPremisesConfiguration $var + * @return $this + */ + public function setOnPremisesConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\OnPremisesConfiguration::class); + $this->on_premises_configuration = $var; + + return $this; + } + + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ReplicaConfiguration replica_configuration = 18; + * @return \Google\Cloud\Sql\V1beta4\ReplicaConfiguration|null + */ + public function getReplicaConfiguration() + { + return $this->replica_configuration; + } + + public function hasReplicaConfiguration() + { + return isset($this->replica_configuration); + } + + public function clearReplicaConfiguration() + { + unset($this->replica_configuration); + } + + /** + * Configuration specific to failover replicas and read replicas. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ReplicaConfiguration replica_configuration = 18; + * @param \Google\Cloud\Sql\V1beta4\ReplicaConfiguration $var + * @return $this + */ + public function setReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ReplicaConfiguration::class); + $this->replica_configuration = $var; + + return $this; + } + + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackendType backend_type = 19; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * The backend type. + * `SECOND_GEN`: Cloud SQL database instance. + * `EXTERNAL`: A database server that is not managed by Google. + * This property is read-only; use the `tier` property in the `settings` + * object to determine the database type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlBackendType backend_type = 19; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlBackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 20; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlSuspensionReason suspension_reason = 21; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSuspensionReason() + { + return $this->suspension_reason; + } + + /** + * If the instance state is SUSPENDED, the reason for the suspension. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlSuspensionReason suspension_reason = 21; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSuspensionReason($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1beta4\SqlSuspensionReason::class); + $this->suspension_reason = $arr; + + return $this; + } + + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + * @return string + */ + public function getConnectionName() + { + return $this->connection_name; + } + + /** + * Connection name of the Cloud SQL instance used in connection strings. + * + * Generated from protobuf field string connection_name = 22; + * @param string $var + * @return $this + */ + public function setConnectionName($var) + { + GPBUtil::checkString($var, True); + $this->connection_name = $var; + + return $this; + } + + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the Cloud SQL instance. This does not include the project ID. + * + * Generated from protobuf field string name = 23; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The geographical region of the Cloud SQL instance. + * It can be one of the + * [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) + * where Cloud SQL operates: + * For example, `asia-east1`, `europe-west1`, and `us-central1`. + * The default value is `us-central1`. + * + * Generated from protobuf field string region = 24; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + * @return string + */ + public function getGceZone() + { + return $this->gce_zone; + } + + /** + * The Compute Engine zone that the instance is currently serving from. This + * value could be different from the zone that was specified when the instance + * was created if the instance has failed over to its secondary zone. WARNING: + * Changing this might restart the instance. + * + * Generated from protobuf field string gce_zone = 25; + * @param string $var + * @return $this + */ + public function setGceZone($var) + { + GPBUtil::checkString($var, True); + $this->gce_zone = $var; + + return $this; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + * @return string + */ + public function getSecondaryGceZone() + { + return $this->secondary_gce_zone; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional instance. This value could be different + * from the zone that was specified when the instance + * was created if the instance has failed over to its secondary/failover zone. + * + * Generated from protobuf field string secondary_gce_zone = 34; + * @param string $var + * @return $this + */ + public function setSecondaryGceZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_gce_zone = $var; + + return $this; + } + + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionConfiguration disk_encryption_configuration = 26; + * @return \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration|null + */ + public function getDiskEncryptionConfiguration() + { + return $this->disk_encryption_configuration; + } + + public function hasDiskEncryptionConfiguration() + { + return isset($this->disk_encryption_configuration); + } + + public function clearDiskEncryptionConfiguration() + { + unset($this->disk_encryption_configuration); + } + + /** + * Disk encryption configuration specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionConfiguration disk_encryption_configuration = 26; + * @param \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration $var + * @return $this + */ + public function setDiskEncryptionConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DiskEncryptionConfiguration::class); + $this->disk_encryption_configuration = $var; + + return $this; + } + + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionStatus disk_encryption_status = 27; + * @return \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus|null + */ + public function getDiskEncryptionStatus() + { + return $this->disk_encryption_status; + } + + public function hasDiskEncryptionStatus() + { + return isset($this->disk_encryption_status); + } + + public function clearDiskEncryptionStatus() + { + unset($this->disk_encryption_status); + } + + /** + * Disk encryption status specific to an instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DiskEncryptionStatus disk_encryption_status = 27; + * @param \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus $var + * @return $this + */ + public function setDiskEncryptionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DiskEncryptionStatus::class); + $this->disk_encryption_status = $var; + + return $this; + } + + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + * @return string + */ + public function getRootPassword() + { + return $this->root_password; + } + + /** + * Initial root password. Use only on creation. You must set root passwords + * before you can connect to PostgreSQL instances. + * + * Generated from protobuf field string root_password = 29; + * @param string $var + * @return $this + */ + public function setRootPassword($var) + { + GPBUtil::checkString($var, True); + $this->root_password = $var; + + return $this; + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + * @return \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlScheduledMaintenance|null + */ + public function getScheduledMaintenance() + { + return $this->scheduled_maintenance; + } + + public function hasScheduledMaintenance() + { + return isset($this->scheduled_maintenance); + } + + public function clearScheduledMaintenance() + { + unset($this->scheduled_maintenance); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance.SqlScheduledMaintenance scheduled_maintenance = 30; + * @param \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlScheduledMaintenance $var + * @return $this + */ + public function setScheduledMaintenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlScheduledMaintenance::class); + $this->scheduled_maintenance = $var; + + return $this; + } + + /** + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Returns the unboxed value from getSatisfiesPzs() + + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @return bool|null + */ + public function getSatisfiesPzsUnwrapped() + { + return $this->readWrapperValue("satisfies_pzs"); + } + + /** + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * The status indicating if instance satisfiesPzs. + * Reserved for future use. + * + * Generated from protobuf field .google.protobuf.BoolValue satisfies_pzs = 35; + * @param bool|null $var + * @return $this + */ + public function setSatisfiesPzsUnwrapped($var) + { + $this->writeWrapperValue("satisfies_pzs", $var); + return $this;} + + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseInstalledVersion() + { + return $this->database_installed_version; + } + + /** + * Output only. Stores the current database version running on the instance + * including minor version such as `MYSQL_8_0_18`. + * + * Generated from protobuf field string database_installed_version = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseInstalledVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_installed_version = $var; + + return $this; + } + + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + * @return \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlOutOfDiskReport|null + */ + public function getOutOfDiskReport() + { + return $this->out_of_disk_report; + } + + public function hasOutOfDiskReport() + { + return isset($this->out_of_disk_report); + } + + public function clearOutOfDiskReport() + { + unset($this->out_of_disk_report); + } + + /** + * This field represents the report generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport out_of_disk_report = 38; + * @param \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlOutOfDiskReport $var + * @return $this + */ + public function setOutOfDiskReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlOutOfDiskReport::class); + $this->out_of_disk_report = $var; + + return $this; + } + + /** + * Output only. The time when the instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.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 instance was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 39 [(.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. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAvailableMaintenanceVersions() + { + return $this->available_maintenance_versions; + } + + /** + * Output only. List all maintenance versions applicable on the instance + * + * Generated from protobuf field repeated string available_maintenance_versions = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAvailableMaintenanceVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->available_maintenance_versions = $arr; + + return $this; + } + + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + * @return string + */ + public function getMaintenanceVersion() + { + return $this->maintenance_version; + } + + /** + * The current software version on the instance. + * + * Generated from protobuf field string maintenance_version = 42; + * @param string $var + * @return $this + */ + public function setMaintenanceVersion($var) + { + GPBUtil::checkString($var, True); + $this->maintenance_version = $var; + + return $this; + } + + /** + * The SQL network architecture for the instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + * @return int + */ + public function getSqlNetworkArchitecture() + { + return isset($this->sql_network_architecture) ? $this->sql_network_architecture : 0; + } + + public function hasSqlNetworkArchitecture() + { + return isset($this->sql_network_architecture); + } + + public function clearSqlNetworkArchitecture() + { + unset($this->sql_network_architecture); + } + + /** + * The SQL network architecture for the instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlNetworkArchitecture sql_network_architecture = 47; + * @param int $var + * @return $this + */ + public function setSqlNetworkArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlNetworkArchitecture::class); + $this->sql_network_architecture = $var; + + return $this; + } + + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPscServiceAttachmentLink() + { + return isset($this->psc_service_attachment_link) ? $this->psc_service_attachment_link : ''; + } + + public function hasPscServiceAttachmentLink() + { + return isset($this->psc_service_attachment_link); + } + + public function clearPscServiceAttachmentLink() + { + unset($this->psc_service_attachment_link); + } + + /** + * Output only. The link to service attachment of PSC instance. + * + * Generated from protobuf field optional string psc_service_attachment_link = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPscServiceAttachmentLink($var) + { + GPBUtil::checkString($var, True); + $this->psc_service_attachment_link = $var; + + return $this; + } + + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDnsName() + { + return isset($this->dns_name) ? $this->dns_name : ''; + } + + public function hasDnsName() + { + return isset($this->dns_name); + } + + public function clearDnsName() + { + unset($this->dns_name); + } + + /** + * Output only. The dns name of the instance. + * + * Generated from protobuf field optional string dns_name = 49 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDnsName($var) + { + GPBUtil::checkString($var, True); + $this->dns_name = $var; + + return $this; + } + + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + return isset($this->primary_dns_name) ? $this->primary_dns_name : ''; + } + + public function hasPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + return isset($this->primary_dns_name); + } + + public function clearPrimaryDnsName() + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + unset($this->primary_dns_name); + } + + /** + * Output only. DEPRECATED: please use write_endpoint instead. + * + * Generated from protobuf field optional string primary_dns_name = 51 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPrimaryDnsName($var) + { + @trigger_error('primary_dns_name is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->primary_dns_name = $var; + + return $this; + } + + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWriteEndpoint() + { + return isset($this->write_endpoint) ? $this->write_endpoint : ''; + } + + public function hasWriteEndpoint() + { + return isset($this->write_endpoint); + } + + public function clearWriteEndpoint() + { + unset($this->write_endpoint); + } + + /** + * Output only. The dns name of the primary instance in a replication group. + * + * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWriteEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->write_endpoint = $var; + + return $this; + } + + /** + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54; + * @return \Google\Cloud\Sql\V1beta4\ReplicationCluster|null + */ + public function getReplicationCluster() + { + return $this->replication_cluster; + } + + public function hasReplicationCluster() + { + return isset($this->replication_cluster); + } + + public function clearReplicationCluster() + { + unset($this->replication_cluster); + } + + /** + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54; + * @param \Google\Cloud\Sql\V1beta4\ReplicationCluster $var + * @return $this + */ + public function setReplicationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ReplicationCluster::class); + $this->replication_cluster = $var; + + return $this; + } + + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55; + * @return \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig|null + */ + public function getGeminiConfig() + { + return $this->gemini_config; + } + + public function hasGeminiConfig() + { + return isset($this->gemini_config); + } + + public function clearGeminiConfig() + { + unset($this->gemini_config); + } + + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55; + * @param \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig $var + * @return $this + */ + public function setGeminiConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig::class); + $this->gemini_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlFailoverReplica.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlFailoverReplica.php new file mode 100644 index 000000000000..66fb0d075a29 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlFailoverReplica.php @@ -0,0 +1,159 @@ +google.cloud.sql.v1beta4.DatabaseInstance.SqlFailoverReplica + */ +class SqlFailoverReplica extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + */ + protected $available = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * @type \Google\Protobuf\BoolValue $available + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the failover replica. If specified at instance creation, a + * failover replica is created for the instance. The name + * doesn't include the project ID. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getAvailable() + { + return $this->available; + } + + public function hasAvailable() + { + return isset($this->available); + } + + public function clearAvailable() + { + unset($this->available); + } + + /** + * Returns the unboxed value from getAvailable() + + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @return bool|null + */ + public function getAvailableUnwrapped() + { + return $this->readWrapperValue("available"); + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setAvailable($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->available = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * failover to the failover replica when the status is true. + * + * Generated from protobuf field .google.protobuf.BoolValue available = 2; + * @param bool|null $var + * @return $this + */ + public function setAvailableUnwrapped($var) + { + $this->writeWrapperValue("available", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlFailoverReplica::class, \Google\Cloud\Sql\V1beta4\DatabaseInstance_SqlFailoverReplica::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlInstanceState.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlInstanceState.php new file mode 100644 index 000000000000..7a120981a060 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlInstanceState.php @@ -0,0 +1,100 @@ +google.cloud.sql.v1beta4.DatabaseInstance.SqlInstanceState + */ +class SqlInstanceState +{ + /** + * The state of the instance is unknown. + * + * Generated from protobuf enum SQL_INSTANCE_STATE_UNSPECIFIED = 0; + */ + const SQL_INSTANCE_STATE_UNSPECIFIED = 0; + /** + * The instance is running, or has been stopped by owner. + * + * Generated from protobuf enum RUNNABLE = 1; + */ + const RUNNABLE = 1; + /** + * The instance is not available, for example due to problems with billing. + * + * Generated from protobuf enum SUSPENDED = 2; + */ + const SUSPENDED = 2; + /** + * The instance is being deleted. + * + * Generated from protobuf enum PENDING_DELETE = 3; + */ + const PENDING_DELETE = 3; + /** + * The instance is being created. + * + * Generated from protobuf enum PENDING_CREATE = 4; + */ + const PENDING_CREATE = 4; + /** + * The instance is down for maintenance. + * + * Generated from protobuf enum MAINTENANCE = 5; + */ + const MAINTENANCE = 5; + /** + * The creation of the instance failed or a fatal error occurred during + * maintenance. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Deprecated + * + * Generated from protobuf enum ONLINE_MAINTENANCE = 7 [deprecated = true]; + */ + const ONLINE_MAINTENANCE = 7; + + private static $valueToName = [ + self::SQL_INSTANCE_STATE_UNSPECIFIED => 'SQL_INSTANCE_STATE_UNSPECIFIED', + self::RUNNABLE => 'RUNNABLE', + self::SUSPENDED => 'SUSPENDED', + self::PENDING_DELETE => 'PENDING_DELETE', + self::PENDING_CREATE => 'PENDING_CREATE', + self::MAINTENANCE => 'MAINTENANCE', + self::FAILED => 'FAILED', + self::ONLINE_MAINTENANCE => 'ONLINE_MAINTENANCE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlInstanceState::class, \Google\Cloud\Sql\V1beta4\DatabaseInstance_SqlInstanceState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlNetworkArchitecture.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlNetworkArchitecture.php new file mode 100644 index 000000000000..39510019b90d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlNetworkArchitecture.php @@ -0,0 +1,62 @@ +google.cloud.sql.v1beta4.DatabaseInstance.SqlNetworkArchitecture + */ +class SqlNetworkArchitecture +{ + /** + * Generated from protobuf enum SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + */ + const SQL_NETWORK_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The instance uses the new network architecture. + * + * Generated from protobuf enum NEW_NETWORK_ARCHITECTURE = 1; + */ + const NEW_NETWORK_ARCHITECTURE = 1; + /** + * The instance uses the old network architecture. + * + * Generated from protobuf enum OLD_NETWORK_ARCHITECTURE = 2; + */ + const OLD_NETWORK_ARCHITECTURE = 2; + + private static $valueToName = [ + self::SQL_NETWORK_ARCHITECTURE_UNSPECIFIED => 'SQL_NETWORK_ARCHITECTURE_UNSPECIFIED', + self::NEW_NETWORK_ARCHITECTURE => 'NEW_NETWORK_ARCHITECTURE', + self::OLD_NETWORK_ARCHITECTURE => 'OLD_NETWORK_ARCHITECTURE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlNetworkArchitecture::class, \Google\Cloud\Sql\V1beta4\DatabaseInstance_SqlNetworkArchitecture::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport.php new file mode 100644 index 000000000000..1e8c43981415 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport.php @@ -0,0 +1,160 @@ +google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport + */ +class SqlOutOfDiskReport extends \Google\Protobuf\Internal\Message +{ + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + */ + protected $sql_out_of_disk_state = null; + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + */ + protected $sql_min_recommended_increase_size_gb = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $sql_out_of_disk_state + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * @type int $sql_min_recommended_increase_size_gb + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + * @return int + */ + public function getSqlOutOfDiskState() + { + return isset($this->sql_out_of_disk_state) ? $this->sql_out_of_disk_state : 0; + } + + public function hasSqlOutOfDiskState() + { + return isset($this->sql_out_of_disk_state); + } + + public function clearSqlOutOfDiskState() + { + unset($this->sql_out_of_disk_state); + } + + /** + * This field represents the state generated by the proactive database + * wellness job for OutOfDisk issues. + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * * the proactive database wellness job + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState sql_out_of_disk_state = 1; + * @param int $var + * @return $this + */ + public function setSqlOutOfDiskState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance\SqlOutOfDiskReport\SqlOutOfDiskState::class); + $this->sql_out_of_disk_state = $var; + + return $this; + } + + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + * @return int + */ + public function getSqlMinRecommendedIncreaseSizeGb() + { + return isset($this->sql_min_recommended_increase_size_gb) ? $this->sql_min_recommended_increase_size_gb : 0; + } + + public function hasSqlMinRecommendedIncreaseSizeGb() + { + return isset($this->sql_min_recommended_increase_size_gb); + } + + public function clearSqlMinRecommendedIncreaseSizeGb() + { + unset($this->sql_min_recommended_increase_size_gb); + } + + /** + * The minimum recommended increase size in GigaBytes + * This field is consumed by the frontend + * * Writers: + * * the proactive database wellness job for OOD. + * * Readers: + * + * Generated from protobuf field optional int32 sql_min_recommended_increase_size_gb = 2; + * @param int $var + * @return $this + */ + public function setSqlMinRecommendedIncreaseSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->sql_min_recommended_increase_size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOutOfDiskReport::class, \Google\Cloud\Sql\V1beta4\DatabaseInstance_SqlOutOfDiskReport::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php new file mode 100644 index 000000000000..86b573dc3c0b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlOutOfDiskReport/SqlOutOfDiskState.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1beta4.DatabaseInstance.SqlOutOfDiskReport.SqlOutOfDiskState + */ +class SqlOutOfDiskState +{ + /** + * Unspecified state + * + * Generated from protobuf enum SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; + */ + const SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; + /** + * The instance has plenty space on data disk + * + * Generated from protobuf enum NORMAL = 1; + */ + const NORMAL = 1; + /** + * Data disk is almost used up. It is shutdown to prevent data + * corruption. + * + * Generated from protobuf enum SOFT_SHUTDOWN = 2; + */ + const SOFT_SHUTDOWN = 2; + + private static $valueToName = [ + self::SQL_OUT_OF_DISK_STATE_UNSPECIFIED => 'SQL_OUT_OF_DISK_STATE_UNSPECIFIED', + self::NORMAL => 'NORMAL', + self::SOFT_SHUTDOWN => 'SOFT_SHUTDOWN', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOutOfDiskState::class, \Google\Cloud\Sql\V1beta4\DatabaseInstance_SqlOutOfDiskReport_SqlOutOfDiskState::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlScheduledMaintenance.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlScheduledMaintenance.php new file mode 100644 index 000000000000..cba44e1034a5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabaseInstance/SqlScheduledMaintenance.php @@ -0,0 +1,190 @@ +google.cloud.sql.v1beta4.DatabaseInstance.SqlScheduledMaintenance + */ +class SqlScheduledMaintenance extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @deprecated + */ + protected $can_defer = false; + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + */ + protected $can_reschedule = false; + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + */ + protected $schedule_deadline_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of any upcoming scheduled maintenance for this instance. + * @type bool $can_defer + * @type bool $can_reschedule + * If the scheduled maintenance can be rescheduled. + * @type \Google\Protobuf\Timestamp $schedule_deadline_time + * Maintenance cannot be rescheduled to start beyond this deadline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getCanDefer() + { + @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); + return $this->can_defer; + } + + /** + * Generated from protobuf field bool can_defer = 2 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setCanDefer($var) + { + @trigger_error('can_defer is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->can_defer = $var; + + return $this; + } + + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + * @return bool + */ + public function getCanReschedule() + { + return $this->can_reschedule; + } + + /** + * If the scheduled maintenance can be rescheduled. + * + * Generated from protobuf field bool can_reschedule = 3; + * @param bool $var + * @return $this + */ + public function setCanReschedule($var) + { + GPBUtil::checkBool($var); + $this->can_reschedule = $var; + + return $this; + } + + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleDeadlineTime() + { + return $this->schedule_deadline_time; + } + + public function hasScheduleDeadlineTime() + { + return isset($this->schedule_deadline_time); + } + + public function clearScheduleDeadlineTime() + { + unset($this->schedule_deadline_time); + } + + /** + * Maintenance cannot be rescheduled to start beyond this deadline. + * + * Generated from protobuf field optional .google.protobuf.Timestamp schedule_deadline_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleDeadlineTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_deadline_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlScheduledMaintenance::class, \Google\Cloud\Sql\V1beta4\DatabaseInstance_SqlScheduledMaintenance::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabasesListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabasesListResponse.php new file mode 100644 index 000000000000..dba79c1d9d80 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DatabasesListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.DatabasesListResponse + */ +class DatabasesListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Database items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#databasesList`. + * @type array<\Google\Cloud\Sql\V1beta4\Database>|\Google\Protobuf\Internal\RepeatedField $items + * List of database resources in the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#databasesList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Database items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of database resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Database items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\Database>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\Database::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteContext.php new file mode 100644 index 000000000000..e2cc9cfdfa7c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteContext.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1beta4.DemoteContext + */ +class DemoteContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Required. The name of the instance which acts as an on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_representative_instance_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteContext`. + * @type string $source_representative_instance_name + * Required. The name of the instance which acts as an on-premises primary + * instance in the replication setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Required. The name of the instance which acts as an on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceRepresentativeInstanceName() + { + return $this->source_representative_instance_name; + } + + /** + * Required. The name of the instance which acts as an on-premises primary + * instance in the replication setup. + * + * Generated from protobuf field string source_representative_instance_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceRepresentativeInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->source_representative_instance_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterConfiguration.php new file mode 100644 index 000000000000..c673d876b592 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterConfiguration.php @@ -0,0 +1,132 @@ +google.cloud.sql.v1beta4.DemoteMasterConfiguration + */ +class DemoteMasterConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + */ + protected $mysql_replica_configuration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterConfiguration`. + * @type \Google\Cloud\Sql\V1beta4\DemoteMasterMySqlReplicaConfiguration $mysql_replica_configuration + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + * @return \Google\Cloud\Sql\V1beta4\DemoteMasterMySqlReplicaConfiguration|null + */ + public function getMysqlReplicaConfiguration() + { + return $this->mysql_replica_configuration; + } + + public function hasMysqlReplicaConfiguration() + { + return isset($this->mysql_replica_configuration); + } + + public function clearMysqlReplicaConfiguration() + { + unset($this->mysql_replica_configuration); + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterMySqlReplicaConfiguration mysql_replica_configuration = 2; + * @param \Google\Cloud\Sql\V1beta4\DemoteMasterMySqlReplicaConfiguration $var + * @return $this + */ + public function setMysqlReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DemoteMasterMySqlReplicaConfiguration::class); + $this->mysql_replica_configuration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterContext.php new file mode 100644 index 000000000000..99aa7ad7ae82 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterContext.php @@ -0,0 +1,294 @@ +google.cloud.sql.v1beta4.DemoteMasterContext + */ +class DemoteMasterContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + */ + protected $verify_gtid_consistency = null; + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + */ + protected $master_instance_name = ''; + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterConfiguration replica_configuration = 4; + */ + protected $replica_configuration = null; + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + */ + protected $skip_replication_setup = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterContext`. + * @type \Google\Protobuf\BoolValue $verify_gtid_consistency + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * @type string $master_instance_name + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * @type \Google\Cloud\Sql\V1beta4\DemoteMasterConfiguration $replica_configuration + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * @type bool $skip_replication_setup + * Flag to skip replication setup on the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getVerifyGtidConsistency() + { + return $this->verify_gtid_consistency; + } + + public function hasVerifyGtidConsistency() + { + return isset($this->verify_gtid_consistency); + } + + public function clearVerifyGtidConsistency() + { + unset($this->verify_gtid_consistency); + } + + /** + * Returns the unboxed value from getVerifyGtidConsistency() + + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @return bool|null + */ + public function getVerifyGtidConsistencyUnwrapped() + { + return $this->readWrapperValue("verify_gtid_consistency"); + } + + /** + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setVerifyGtidConsistency($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->verify_gtid_consistency = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Verify the GTID consistency for demote operation. Default value: + * `True`. Setting this flag to `false` enables you to bypass the GTID + * consistency check between on-premises primary instance and Cloud SQL + * instance during the demotion operation but also exposes you to the risk of + * future replication failures. Change the value only if you know the reason + * for the GTID divergence and are confident that doing so will not cause any + * replication issues. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_gtid_consistency = 2; + * @param bool|null $var + * @return $this + */ + public function setVerifyGtidConsistencyUnwrapped($var) + { + $this->writeWrapperValue("verify_gtid_consistency", $var); + return $this;} + + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + * @return string + */ + public function getMasterInstanceName() + { + return $this->master_instance_name; + } + + /** + * The name of the instance which will act as on-premises primary instance + * in the replication setup. + * + * Generated from protobuf field string master_instance_name = 3; + * @param string $var + * @return $this + */ + public function setMasterInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->master_instance_name = $var; + + return $this; + } + + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterConfiguration replica_configuration = 4; + * @return \Google\Cloud\Sql\V1beta4\DemoteMasterConfiguration|null + */ + public function getReplicaConfiguration() + { + return $this->replica_configuration; + } + + public function hasReplicaConfiguration() + { + return isset($this->replica_configuration); + } + + public function clearReplicaConfiguration() + { + unset($this->replica_configuration); + } + + /** + * Configuration specific to read-replicas replicating from the on-premises + * primary instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterConfiguration replica_configuration = 4; + * @param \Google\Cloud\Sql\V1beta4\DemoteMasterConfiguration $var + * @return $this + */ + public function setReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DemoteMasterConfiguration::class); + $this->replica_configuration = $var; + + return $this; + } + + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + * @return bool + */ + public function getSkipReplicationSetup() + { + return $this->skip_replication_setup; + } + + /** + * Flag to skip replication setup on the instance. + * + * Generated from protobuf field bool skip_replication_setup = 5; + * @param bool $var + * @return $this + */ + public function setSkipReplicationSetup($var) + { + GPBUtil::checkBool($var); + $this->skip_replication_setup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterMySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterMySqlReplicaConfiguration.php new file mode 100644 index 000000000000..1aeef5e677c9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DemoteMasterMySqlReplicaConfiguration.php @@ -0,0 +1,245 @@ +google.cloud.sql.v1beta4.DemoteMasterMySqlReplicaConfiguration + */ +class DemoteMasterMySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + */ + protected $password = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + */ + protected $client_key = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + */ + protected $client_certificate = ''; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + */ + protected $ca_certificate = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * @type string $username + * The username for the replication connection. + * @type string $password + * The password for the replication connection. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#demoteMasterMysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. The format of the replica's + * private key can be either PKCS #1 or PKCS #8. + * + * Generated from protobuf field string client_key = 4; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 5; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DenyMaintenancePeriod.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DenyMaintenancePeriod.php new file mode 100644 index 000000000000..28e3ebdb329d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DenyMaintenancePeriod.php @@ -0,0 +1,164 @@ +google.cloud.sql.v1beta4.DenyMaintenancePeriod + */ +class DenyMaintenancePeriod extends \Google\Protobuf\Internal\Message +{ + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + */ + protected $start_date = ''; + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * deny maintenance period recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + */ + protected $end_date = ''; + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + */ + protected $time = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_date + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * @type string $end_date + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * deny maintenance period recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * @type string $time + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + * @return string + */ + public function getStartDate() + { + return $this->start_date; + } + + /** + * "deny maintenance period" start date. If the year of the start date is + * empty, the year of the end date also must be empty. In this case, it means + * the deny maintenance period recurs every year. The date is in format + * yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string start_date = 1; + * @param string $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkString($var, True); + $this->start_date = $var; + + return $this; + } + + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * deny maintenance period recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + * @return string + */ + public function getEndDate() + { + return $this->end_date; + } + + /** + * "deny maintenance period" end date. If the year of the end date is empty, + * the year of the start date also must be empty. In this case, it means the + * deny maintenance period recurs every year. The date is in format yyyy-mm-dd + * i.e., 2020-11-01, or mm-dd, i.e., 11-01 + * + * Generated from protobuf field string end_date = 2; + * @param string $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkString($var, True); + $this->end_date = $var; + + return $this; + } + + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + * @return string + */ + public function getTime() + { + return $this->time; + } + + /** + * Time in UTC when the "deny maintenance period" starts on start_date and + * ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 + * + * Generated from protobuf field string time = 3; + * @param string $var + * @return $this + */ + public function setTime($var) + { + GPBUtil::checkString($var, True); + $this->time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionConfiguration.php new file mode 100644 index 000000000000..175d70be2f14 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionConfiguration.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.DiskEncryptionConfiguration + */ +class DiskEncryptionConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + */ + protected $kms_key_name = ''; + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Resource name of KMS key for disk encryption + * @type string $kind + * This is always `sql#diskEncryptionConfiguration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Resource name of KMS key for disk encryption + * + * Generated from protobuf field string kms_key_name = 1; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#diskEncryptionConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionStatus.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionStatus.php new file mode 100644 index 000000000000..668762abc4ab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/DiskEncryptionStatus.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.DiskEncryptionStatus + */ +class DiskEncryptionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + */ + protected $kms_key_version_name = ''; + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_version_name + * KMS key version used to encrypt the Cloud SQL instance resource + * @type string $kind + * This is always `sql#diskEncryptionStatus`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + * @return string + */ + public function getKmsKeyVersionName() + { + return $this->kms_key_version_name; + } + + /** + * KMS key version used to encrypt the Cloud SQL instance resource + * + * Generated from protobuf field string kms_key_version_name = 1; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_name = $var; + + return $this; + } + + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#diskEncryptionStatus`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext.php new file mode 100644 index 000000000000..870fde36941e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext.php @@ -0,0 +1,436 @@ +google.cloud.sql.v1beta4.ExportContext + */ +class ExportContext extends \Google\Protobuf\Internal\Message +{ + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + */ + private $databases; + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlExportOptions sql_export_options = 4; + */ + protected $sql_export_options = null; + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlCsvExportOptions csv_export_options = 5; + */ + protected $csv_export_options = null; + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFileType file_type = 6; + */ + protected $file_type = 0; + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + */ + protected $offload = null; + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlBakExportOptions bak_export_options = 9; + */ + protected $bak_export_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * @type array|\Google\Protobuf\Internal\RepeatedField $databases + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * @type string $kind + * This is always `sql#exportContext`. + * @type \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions $sql_export_options + * Options for exporting data as SQL statements. + * @type \Google\Cloud\Sql\V1beta4\ExportContext\SqlCsvExportOptions $csv_export_options + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * @type int $file_type + * The file type for the specified uri. + * @type \Google\Protobuf\BoolValue $offload + * Option for export offload. + * @type \Google\Cloud\Sql\V1beta4\ExportContext\SqlBakExportOptions $bak_export_options + * Options for exporting data as BAK files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The path to the file in Google Cloud Storage where the export will be + * stored. The URI is in the form `gs://bucketName/fileName`. If the file + * already exists, the request succeeds, but the operation fails. If + * `fileType` is `SQL` and the filename ends with .gz, + * the contents are compressed. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabases() + { + return $this->databases; + } + + /** + * Databases to be exported.
`MySQL instances:` If + * `fileType` is `SQL` and no database is specified, all + * databases are exported, except for the `mysql` system database. + * If `fileType` is `CSV`, you can specify one database, + * either by using this property or by using the + * `csvExportOptions.selectQuery` property, which takes precedence + * over this property.
`PostgreSQL instances:` You must specify + * one database to be exported. If `fileType` is `CSV`, + * this database must match the one specified in the + * `csvExportOptions.selectQuery` property.
`SQL Server + * instances:` You must specify one database to be exported, and the + * `fileType` must be `BAK`. + * + * Generated from protobuf field repeated string databases = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->databases = $arr; + + return $this; + } + + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#exportContext`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlExportOptions sql_export_options = 4; + * @return \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions|null + */ + public function getSqlExportOptions() + { + return $this->sql_export_options; + } + + public function hasSqlExportOptions() + { + return isset($this->sql_export_options); + } + + public function clearSqlExportOptions() + { + unset($this->sql_export_options); + } + + /** + * Options for exporting data as SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlExportOptions sql_export_options = 4; + * @param \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions $var + * @return $this + */ + public function setSqlExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions::class); + $this->sql_export_options = $var; + + return $this; + } + + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlCsvExportOptions csv_export_options = 5; + * @return \Google\Cloud\Sql\V1beta4\ExportContext\SqlCsvExportOptions|null + */ + public function getCsvExportOptions() + { + return $this->csv_export_options; + } + + public function hasCsvExportOptions() + { + return isset($this->csv_export_options); + } + + public function clearCsvExportOptions() + { + unset($this->csv_export_options); + } + + /** + * Options for exporting data as CSV. `MySQL` and `PostgreSQL` + * instances only. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlCsvExportOptions csv_export_options = 5; + * @param \Google\Cloud\Sql\V1beta4\ExportContext\SqlCsvExportOptions $var + * @return $this + */ + public function setCsvExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ExportContext\SqlCsvExportOptions::class); + $this->csv_export_options = $var; + + return $this; + } + + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFileType file_type = 6; + * @return int + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * The file type for the specified uri. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFileType file_type = 6; + * @param int $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlFileType::class); + $this->file_type = $var; + + return $this; + } + + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @return \Google\Protobuf\BoolValue|null + */ + public function getOffload() + { + return $this->offload; + } + + public function hasOffload() + { + return isset($this->offload); + } + + public function clearOffload() + { + unset($this->offload); + } + + /** + * Returns the unboxed value from getOffload() + + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @return bool|null + */ + public function getOffloadUnwrapped() + { + return $this->readWrapperValue("offload"); + } + + /** + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setOffload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->offload = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Option for export offload. + * + * Generated from protobuf field .google.protobuf.BoolValue offload = 8; + * @param bool|null $var + * @return $this + */ + public function setOffloadUnwrapped($var) + { + $this->writeWrapperValue("offload", $var); + return $this;} + + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlBakExportOptions bak_export_options = 9; + * @return \Google\Cloud\Sql\V1beta4\ExportContext\SqlBakExportOptions|null + */ + public function getBakExportOptions() + { + return $this->bak_export_options; + } + + public function hasBakExportOptions() + { + return isset($this->bak_export_options); + } + + public function clearBakExportOptions() + { + unset($this->bak_export_options); + } + + /** + * Options for exporting data as BAK files. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlBakExportOptions bak_export_options = 9; + * @param \Google\Cloud\Sql\V1beta4\ExportContext\SqlBakExportOptions $var + * @return $this + */ + public function setBakExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ExportContext\SqlBakExportOptions::class); + $this->bak_export_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlBakExportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlBakExportOptions.php new file mode 100644 index 000000000000..eb66b55a1362 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlBakExportOptions.php @@ -0,0 +1,380 @@ +google.cloud.sql.v1beta4.ExportContext.SqlBakExportOptions + */ +class SqlBakExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + */ + protected $striped = null; + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + */ + protected $stripe_count = null; + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BakType bak_type = 4; + */ + protected $bak_type = 0; + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @deprecated + */ + protected $copy_only = null; + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + */ + protected $differential_base = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $striped + * Whether or not the export should be striped. + * @type \Google\Protobuf\Int32Value $stripe_count + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * @type int $bak_type + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * @type \Google\Protobuf\BoolValue $copy_only + * Deprecated: copy_only is deprecated. Use differential_base instead + * @type \Google\Protobuf\BoolValue $differential_base + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStriped() + { + return $this->striped; + } + + public function hasStriped() + { + return isset($this->striped); + } + + public function clearStriped() + { + unset($this->striped); + } + + /** + * Returns the unboxed value from getStriped() + + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @return bool|null + */ + public function getStripedUnwrapped() + { + return $this->readWrapperValue("striped"); + } + + /** + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStriped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->striped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the export should be striped. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 1; + * @param bool|null $var + * @return $this + */ + public function setStripedUnwrapped($var) + { + $this->writeWrapperValue("striped", $var); + return $this;} + + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getStripeCount() + { + return $this->stripe_count; + } + + public function hasStripeCount() + { + return isset($this->stripe_count); + } + + public function clearStripeCount() + { + unset($this->stripe_count); + } + + /** + * Returns the unboxed value from getStripeCount() + + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @return int|null + */ + public function getStripeCountUnwrapped() + { + return $this->readWrapperValue("stripe_count"); + } + + /** + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setStripeCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->stripe_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Option for specifying how many stripes to use for the export. + * If blank, and the value of the striped field is true, + * the number of stripes is automatically chosen. + * + * Generated from protobuf field .google.protobuf.Int32Value stripe_count = 2; + * @param int|null $var + * @return $this + */ + public function setStripeCountUnwrapped($var) + { + $this->writeWrapperValue("stripe_count", $var); + return $this;} + + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BakType bak_type = 4; + * @return int + */ + public function getBakType() + { + return $this->bak_type; + } + + /** + * Type of this bak file will be export, FULL or DIFF, SQL Server only + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BakType bak_type = 4; + * @param int $var + * @return $this + */ + public function setBakType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BakType::class); + $this->bak_type = $var; + + return $this; + } + + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return $this->copy_only; + } + + public function hasCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return isset($this->copy_only); + } + + public function clearCopyOnly() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + unset($this->copy_only); + } + + /** + * Returns the unboxed value from getCopyOnly() + + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @return bool|null + */ + public function getCopyOnlyUnwrapped() + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("copy_only"); + } + + /** + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setCopyOnly($var) + { + @trigger_error('copy_only is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->copy_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Deprecated: copy_only is deprecated. Use differential_base instead + * + * Generated from protobuf field .google.protobuf.BoolValue copy_only = 5 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setCopyOnlyUnwrapped($var) + { + $this->writeWrapperValue("copy_only", $var); + return $this;} + + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDifferentialBase() + { + return $this->differential_base; + } + + public function hasDifferentialBase() + { + return isset($this->differential_base); + } + + public function clearDifferentialBase() + { + unset($this->differential_base); + } + + /** + * Returns the unboxed value from getDifferentialBase() + + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @return bool|null + */ + public function getDifferentialBaseUnwrapped() + { + return $this->readWrapperValue("differential_base"); + } + + /** + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDifferentialBase($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->differential_base = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup can be used as a differential base + * copy_only backup can not be served as differential base + * + * Generated from protobuf field .google.protobuf.BoolValue differential_base = 6; + * @param bool|null $var + * @return $this + */ + public function setDifferentialBaseUnwrapped($var) + { + $this->writeWrapperValue("differential_base", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlBakExportOptions::class, \Google\Cloud\Sql\V1beta4\ExportContext_SqlBakExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlCsvExportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlCsvExportOptions.php new file mode 100644 index 000000000000..db6922d62fce --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlCsvExportOptions.php @@ -0,0 +1,216 @@ +google.cloud.sql.v1beta4.ExportContext.SqlCsvExportOptions + */ +class SqlCsvExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + */ + protected $select_query = ''; + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + */ + protected $escape_character = ''; + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + */ + protected $quote_character = ''; + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + */ + protected $fields_terminated_by = ''; + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + */ + protected $lines_terminated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $select_query + * The select query used to extract the data. + * @type string $escape_character + * Specifies the character that should appear before a data character that + * needs to be escaped. + * @type string $quote_character + * Specifies the quoting character to be used when a data value is quoted. + * @type string $fields_terminated_by + * Specifies the character that separates columns within each row (line) of + * the file. + * @type string $lines_terminated_by + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + * @return string + */ + public function getSelectQuery() + { + return $this->select_query; + } + + /** + * The select query used to extract the data. + * + * Generated from protobuf field string select_query = 1; + * @param string $var + * @return $this + */ + public function setSelectQuery($var) + { + GPBUtil::checkString($var, True); + $this->select_query = $var; + + return $this; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + * @return string + */ + public function getEscapeCharacter() + { + return $this->escape_character; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 2; + * @param string $var + * @return $this + */ + public function setEscapeCharacter($var) + { + GPBUtil::checkString($var, True); + $this->escape_character = $var; + + return $this; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + * @return string + */ + public function getQuoteCharacter() + { + return $this->quote_character; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 3; + * @param string $var + * @return $this + */ + public function setQuoteCharacter($var) + { + GPBUtil::checkString($var, True); + $this->quote_character = $var; + + return $this; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + * @return string + */ + public function getFieldsTerminatedBy() + { + return $this->fields_terminated_by; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 4; + * @param string $var + * @return $this + */ + public function setFieldsTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->fields_terminated_by = $var; + + return $this; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + * @return string + */ + public function getLinesTerminatedBy() + { + return $this->lines_terminated_by; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 6; + * @param string $var + * @return $this + */ + public function setLinesTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->lines_terminated_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlCsvExportOptions::class, \Google\Cloud\Sql\V1beta4\ExportContext_SqlCsvExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions.php new file mode 100644 index 000000000000..9f6c1a47b462 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions.php @@ -0,0 +1,326 @@ +google.cloud.sql.v1beta4.ExportContext.SqlExportOptions + */ +class SqlExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + */ + private $tables; + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + */ + protected $schema_only = null; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + */ + protected $mysql_export_options = null; + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threads = null; + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallel = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $tables + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * @type \Google\Protobuf\BoolValue $schema_only + * Export only schemas. + * @type \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions\MysqlExportOptions $mysql_export_options + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel export. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the export should be parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTables() + { + return $this->tables; + } + + /** + * Tables to export, or that were exported, from the specified database. If + * you specify tables, specify one and only one database. For PostgreSQL + * instances, you can specify only one table. + * + * Generated from protobuf field repeated string tables = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tables = $arr; + + return $this; + } + + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSchemaOnly() + { + return $this->schema_only; + } + + public function hasSchemaOnly() + { + return isset($this->schema_only); + } + + public function clearSchemaOnly() + { + unset($this->schema_only); + } + + /** + * Returns the unboxed value from getSchemaOnly() + + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @return bool|null + */ + public function getSchemaOnlyUnwrapped() + { + return $this->readWrapperValue("schema_only"); + } + + /** + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSchemaOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->schema_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Export only schemas. + * + * Generated from protobuf field .google.protobuf.BoolValue schema_only = 2; + * @param bool|null $var + * @return $this + */ + public function setSchemaOnlyUnwrapped($var) + { + $this->writeWrapperValue("schema_only", $var); + return $this;} + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + * @return \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions\MysqlExportOptions|null + */ + public function getMysqlExportOptions() + { + return $this->mysql_export_options; + } + + public function hasMysqlExportOptions() + { + return isset($this->mysql_export_options); + } + + public function clearMysqlExportOptions() + { + unset($this->mysql_export_options); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext.SqlExportOptions.MysqlExportOptions mysql_export_options = 3; + * @param \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions\MysqlExportOptions $var + * @return $this + */ + public function setMysqlExportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ExportContext\SqlExportOptions\MysqlExportOptions::class); + $this->mysql_export_options = $var; + + return $this; + } + + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsUnwrapped() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel export. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsUnwrapped($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelUnwrapped() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the export should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelUnwrapped($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlExportOptions::class, \Google\Cloud\Sql\V1beta4\ExportContext_SqlExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions/MysqlExportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions/MysqlExportOptions.php new file mode 100644 index 000000000000..8f3e66f498e5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExportContext/SqlExportOptions/MysqlExportOptions.php @@ -0,0 +1,137 @@ +google.cloud.sql.v1beta4.ExportContext.SqlExportOptions.MysqlExportOptions + */ +class MysqlExportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + */ + protected $master_data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $master_data + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getMasterData() + { + return $this->master_data; + } + + public function hasMasterData() + { + return isset($this->master_data); + } + + public function clearMasterData() + { + unset($this->master_data); + } + + /** + * Returns the unboxed value from getMasterData() + + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @return int|null + */ + public function getMasterDataUnwrapped() + { + return $this->readWrapperValue("master_data"); + } + + /** + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setMasterData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->master_data = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Option to include SQL statement required to set up replication. If set + * to `1`, the dump file includes a CHANGE MASTER TO statement with the + * binary log coordinates, and --set-gtid-purged is set to ON. If set to + * `2`, the CHANGE MASTER TO statement is written as a SQL comment and + * has no effect. If set to any value other than `1`, --set-gtid-purged + * is set to OFF. + * + * Generated from protobuf field .google.protobuf.Int32Value master_data = 1; + * @param int|null $var + * @return $this + */ + public function setMasterDataUnwrapped($var) + { + $this->writeWrapperValue("master_data", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MysqlExportOptions::class, \Google\Cloud\Sql\V1beta4\ExportContext_SqlExportOptions_MysqlExportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExternalSyncParallelLevel.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExternalSyncParallelLevel.php new file mode 100644 index 000000000000..c357eb91698c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ExternalSyncParallelLevel.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1beta4.ExternalSyncParallelLevel + */ +class ExternalSyncParallelLevel +{ + /** + * Unknown sync parallel level. Will be defaulted to OPTIMAL. + * + * Generated from protobuf enum EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; + */ + const EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED = 0; + /** + * Minimal parallel level. + * + * Generated from protobuf enum MIN = 1; + */ + const MIN = 1; + /** + * Optimal parallel level. + * + * Generated from protobuf enum OPTIMAL = 2; + */ + const OPTIMAL = 2; + /** + * Maximum parallel level. + * + * Generated from protobuf enum MAX = 3; + */ + const MAX = 3; + + private static $valueToName = [ + self::EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED => 'EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED', + self::MIN => 'MIN', + self::OPTIMAL => 'OPTIMAL', + self::MAX => 'MAX', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FailoverContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FailoverContext.php new file mode 100644 index 000000000000..4ea32c63aaaf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FailoverContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1beta4.FailoverContext + */ +class FailoverContext extends \Google\Protobuf\Internal\Message +{ + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + */ + protected $settings_version = 0; + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $settings_version + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * @type string $kind + * This is always `sql#failoverContext`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + * @return int|string + */ + public function getSettingsVersion() + { + return $this->settings_version; + } + + /** + * The current settings version of this instance. Request will be rejected if + * this version doesn't match the current settings version. + * + * Generated from protobuf field int64 settings_version = 1; + * @param int|string $var + * @return $this + */ + public function setSettingsVersion($var) + { + GPBUtil::checkInt64($var); + $this->settings_version = $var; + + return $this; + } + + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#failoverContext`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Flag.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Flag.php new file mode 100644 index 000000000000..ea9e324df1fc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Flag.php @@ -0,0 +1,579 @@ +google.cloud.sql.v1beta4.Flag + */ +class Flag extends \Google\Protobuf\Internal\Message +{ + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags which do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFlagType type = 2; + */ + protected $type = 0; + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3; + */ + private $applies_to; + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + */ + private $allowed_string_values; + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + */ + protected $min_value = null; + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + */ + protected $max_value = null; + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + */ + protected $requires_restart = null; + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + */ + protected $kind = ''; + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + */ + protected $in_beta = null; + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + */ + private $allowed_int_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * @type int $type + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags which do not take a + * value, such as `skip_grant_tables`. + * @type array|\Google\Protobuf\Internal\RepeatedField $applies_to + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_string_values + * For `STRING` flags, a list of strings that the value can be set to. + * @type \Google\Protobuf\Int64Value $min_value + * For `INTEGER` flags, the minimum allowed value. + * @type \Google\Protobuf\Int64Value $max_value + * For `INTEGER` flags, the maximum allowed value. + * @type \Google\Protobuf\BoolValue $requires_restart + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * @type string $kind + * This is always `sql#flag`. + * @type \Google\Protobuf\BoolValue $in_beta + * Whether or not the flag is considered in beta. + * @type array|array|\Google\Protobuf\Internal\RepeatedField $allowed_int_values + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * This is the name of the flag. Flag names always use underscores, not + * hyphens, for example: `max_allowed_packet` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags which do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFlagType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, + * `INTEGER` or `NONE`. `NONE` is used for flags which do not take a + * value, such as `skip_grant_tables`. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFlagType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlFlagType::class); + $this->type = $var; + + return $this; + } + + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAppliesTo() + { + return $this->applies_to; + } + + /** + * The database version this flag applies to. Can be + * MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, + * or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, + * `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: + * `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, + * `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, + * `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or + * `SQLSERVER_2019_WEB`. + * See [the complete + * list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlDatabaseVersion applies_to = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAppliesTo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Sql\V1beta4\SqlDatabaseVersion::class); + $this->applies_to = $arr; + + return $this; + } + + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedStringValues() + { + return $this->allowed_string_values; + } + + /** + * For `STRING` flags, a list of strings that the value can be set to. + * + * Generated from protobuf field repeated string allowed_string_values = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedStringValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_string_values = $arr; + + return $this; + } + + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMinValue() + { + return $this->min_value; + } + + public function hasMinValue() + { + return isset($this->min_value); + } + + public function clearMinValue() + { + unset($this->min_value); + } + + /** + * Returns the unboxed value from getMinValue() + + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @return int|string|null + */ + public function getMinValueUnwrapped() + { + return $this->readWrapperValue("min_value"); + } + + /** + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->min_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * For `INTEGER` flags, the minimum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value min_value = 5; + * @param int|string|null $var + * @return $this + */ + public function setMinValueUnwrapped($var) + { + $this->writeWrapperValue("min_value", $var); + return $this;} + + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMaxValue() + { + return $this->max_value; + } + + public function hasMaxValue() + { + return isset($this->max_value); + } + + public function clearMaxValue() + { + unset($this->max_value); + } + + /** + * Returns the unboxed value from getMaxValue() + + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @return int|string|null + */ + public function getMaxValueUnwrapped() + { + return $this->readWrapperValue("max_value"); + } + + /** + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->max_value = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * For `INTEGER` flags, the maximum allowed value. + * + * Generated from protobuf field .google.protobuf.Int64Value max_value = 6; + * @param int|string|null $var + * @return $this + */ + public function setMaxValueUnwrapped($var) + { + $this->writeWrapperValue("max_value", $var); + return $this;} + + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRequiresRestart() + { + return $this->requires_restart; + } + + public function hasRequiresRestart() + { + return isset($this->requires_restart); + } + + public function clearRequiresRestart() + { + unset($this->requires_restart); + } + + /** + * Returns the unboxed value from getRequiresRestart() + + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @return bool|null + */ + public function getRequiresRestartUnwrapped() + { + return $this->readWrapperValue("requires_restart"); + } + + /** + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRequiresRestart($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->requires_restart = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Indicates whether changing this flag will trigger a database restart. Only + * applicable to Second Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue requires_restart = 7; + * @param bool|null $var + * @return $this + */ + public function setRequiresRestartUnwrapped($var) + { + $this->writeWrapperValue("requires_restart", $var); + return $this;} + + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#flag`. + * + * Generated from protobuf field string kind = 8; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @return \Google\Protobuf\BoolValue|null + */ + public function getInBeta() + { + return $this->in_beta; + } + + public function hasInBeta() + { + return isset($this->in_beta); + } + + public function clearInBeta() + { + unset($this->in_beta); + } + + /** + * Returns the unboxed value from getInBeta() + + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @return bool|null + */ + public function getInBetaUnwrapped() + { + return $this->readWrapperValue("in_beta"); + } + + /** + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setInBeta($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->in_beta = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the flag is considered in beta. + * + * Generated from protobuf field .google.protobuf.BoolValue in_beta = 9; + * @param bool|null $var + * @return $this + */ + public function setInBetaUnwrapped($var) + { + $this->writeWrapperValue("in_beta", $var); + return $this;} + + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedIntValues() + { + return $this->allowed_int_values; + } + + /** + * Use this field if only certain integers are accepted. Can be combined + * with min_value and max_value to add additional values. + * + * Generated from protobuf field repeated int64 allowed_int_values = 10; + * @param array|array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedIntValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->allowed_int_values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FlagsListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FlagsListResponse.php new file mode 100644 index 000000000000..80c97ec84f52 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/FlagsListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.FlagsListResponse + */ +class FlagsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Flag items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#flagsList`. + * @type array<\Google\Cloud\Sql\V1beta4\Flag>|\Google\Protobuf\Internal\RepeatedField $items + * List of flags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#flagsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Flag items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of flags. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Flag items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\Flag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\Flag::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GeminiInstanceConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GeminiInstanceConfig.php new file mode 100644 index 000000000000..87c2c9b9e316 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GeminiInstanceConfig.php @@ -0,0 +1,297 @@ +google.cloud.sql.v1beta4.GeminiInstanceConfig + */ +class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entitled = null; + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_vacuum_mgmt_enabled = null; + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oom_session_cancel_enabled = null; + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $active_query_enabled = null; + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_advisor_enabled = null; + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $flag_recommender_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $entitled + * Output only. Whether Gemini is enabled. + * @type bool $google_vacuum_mgmt_enabled + * Output only. Whether vacuum management is enabled. + * @type bool $oom_session_cancel_enabled + * Output only. Whether oom session cancel is enabled. + * @type bool $active_query_enabled + * Output only. Whether active query is enabled. + * @type bool $index_advisor_enabled + * Output only. Whether index advisor is enabled. + * @type bool $flag_recommender_enabled + * Output only. Whether flag recommender is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getEntitled() + { + return isset($this->entitled) ? $this->entitled : false; + } + + public function hasEntitled() + { + return isset($this->entitled); + } + + public function clearEntitled() + { + unset($this->entitled); + } + + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEntitled($var) + { + GPBUtil::checkBool($var); + $this->entitled = $var; + + return $this; + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false; + } + + public function hasGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled); + } + + public function clearGoogleVacuumMgmtEnabled() + { + unset($this->google_vacuum_mgmt_enabled); + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleVacuumMgmtEnabled($var) + { + GPBUtil::checkBool($var); + $this->google_vacuum_mgmt_enabled = $var; + + return $this; + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false; + } + + public function hasOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled); + } + + public function clearOomSessionCancelEnabled() + { + unset($this->oom_session_cancel_enabled); + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOomSessionCancelEnabled($var) + { + GPBUtil::checkBool($var); + $this->oom_session_cancel_enabled = $var; + + return $this; + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActiveQueryEnabled() + { + return isset($this->active_query_enabled) ? $this->active_query_enabled : false; + } + + public function hasActiveQueryEnabled() + { + return isset($this->active_query_enabled); + } + + public function clearActiveQueryEnabled() + { + unset($this->active_query_enabled); + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActiveQueryEnabled($var) + { + GPBUtil::checkBool($var); + $this->active_query_enabled = $var; + + return $this; + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false; + } + + public function hasIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled); + } + + public function clearIndexAdvisorEnabled() + { + unset($this->index_advisor_enabled); + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIndexAdvisorEnabled($var) + { + GPBUtil::checkBool($var); + $this->index_advisor_enabled = $var; + + return $this; + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false; + } + + public function hasFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled); + } + + public function clearFlagRecommenderEnabled() + { + unset($this->flag_recommender_enabled); + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFlagRecommenderEnabled($var) + { + GPBUtil::checkBool($var); + $this->flag_recommender_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertRequest.php new file mode 100644 index 000000000000..a8b2b17cbab6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertRequest.php @@ -0,0 +1,261 @@ +google.cloud.sql.v1beta4.GenerateEphemeralCertRequest + */ +class GenerateEphemeralCertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + */ + protected $public_key = ''; + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $access_token = ''; + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_time = null; + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $valid_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $public_key + * PEM encoded public key to include in the signed certificate. + * @type string $access_token + * Optional. Access token to include in the signed certificate. + * @type \Google\Protobuf\Timestamp $read_time + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * @type \Google\Protobuf\Duration $valid_duration + * Optional. If set, it will contain the cert valid duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 3; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Optional. Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getValidDuration() + { + return $this->valid_duration; + } + + public function hasValidDuration() + { + return isset($this->valid_duration); + } + + public function clearValidDuration() + { + unset($this->valid_duration); + } + + /** + * Optional. If set, it will contain the cert valid duration. + * + * Generated from protobuf field .google.protobuf.Duration valid_duration = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setValidDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->valid_duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertResponse.php new file mode 100644 index 000000000000..aaae185674fc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GenerateEphemeralCertResponse.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.GenerateEphemeralCertResponse + */ +class GenerateEphemeralCertResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert ephemeral_cert = 1; + */ + protected $ephemeral_cert = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\SslCert $ephemeral_cert + * Generated cert + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert ephemeral_cert = 1; + * @return \Google\Cloud\Sql\V1beta4\SslCert|null + */ + public function getEphemeralCert() + { + return $this->ephemeral_cert; + } + + public function hasEphemeralCert() + { + return isset($this->ephemeral_cert); + } + + public function clearEphemeralCert() + { + unset($this->ephemeral_cert); + } + + /** + * Generated cert + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert ephemeral_cert = 1; + * @param \Google\Cloud\Sql\V1beta4\SslCert $var + * @return $this + */ + public function setEphemeralCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->ephemeral_cert = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GetConnectSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GetConnectSettingsRequest.php new file mode 100644 index 000000000000..b8e15c6fc8ae --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/GetConnectSettingsRequest.php @@ -0,0 +1,149 @@ +google.cloud.sql.v1beta4.GetConnectSettingsRequest + */ +class GetConnectSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Protobuf\Timestamp $read_time + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlConnect::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext.php new file mode 100644 index 000000000000..e8b2059b8265 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext.php @@ -0,0 +1,371 @@ +google.cloud.sql.v1beta4.ImportContext + */ +class ImportContext extends \Google\Protobuf\Internal\Message +{ + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + */ + protected $database = ''; + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * The file type for the specified uri. + * * `SQL`: The file contains SQL statements. + * * `CSV`: The file contains CSV data. + * * `BAK`: The file contains backup data for a SQL Server instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFileType file_type = 4; + */ + protected $file_type = 0; + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlCsvImportOptions csv_import_options = 5; + */ + protected $csv_import_options = null; + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + */ + protected $import_user = ''; + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions bak_import_options = 7; + */ + protected $bak_import_options = null; + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sql_import_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * @type string $database + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * @type string $kind + * This is always `sql#importContext`. + * @type int $file_type + * The file type for the specified uri. + * * `SQL`: The file contains SQL statements. + * * `CSV`: The file contains CSV data. + * * `BAK`: The file contains backup data for a SQL Server instance. + * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlCsvImportOptions $csv_import_options + * Options for importing data as CSV. + * @type string $import_user + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions $bak_import_options + * Import parameters specific to SQL Server .BAK files + * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions $sql_import_options + * Optional. Options for importing data from SQL statements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Path to the import file in Cloud Storage, in the form + * `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported + * when `fileType` is `SQL`. The instance must have + * write permissions to the bucket and read access to the file. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The target database for the import. If `fileType` is `SQL`, this field + * is required only if the import file does not specify a database, and is + * overridden by any database specification in the import file. If + * `fileType` is `CSV`, one database must be specified. + * + * Generated from protobuf field string database = 2; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#importContext`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The file type for the specified uri. + * * `SQL`: The file contains SQL statements. + * * `CSV`: The file contains CSV data. + * * `BAK`: The file contains backup data for a SQL Server instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFileType file_type = 4; + * @return int + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * The file type for the specified uri. + * * `SQL`: The file contains SQL statements. + * * `CSV`: The file contains CSV data. + * * `BAK`: The file contains backup data for a SQL Server instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlFileType file_type = 4; + * @param int $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlFileType::class); + $this->file_type = $var; + + return $this; + } + + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlCsvImportOptions csv_import_options = 5; + * @return \Google\Cloud\Sql\V1beta4\ImportContext\SqlCsvImportOptions|null + */ + public function getCsvImportOptions() + { + return $this->csv_import_options; + } + + public function hasCsvImportOptions() + { + return isset($this->csv_import_options); + } + + public function clearCsvImportOptions() + { + unset($this->csv_import_options); + } + + /** + * Options for importing data as CSV. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlCsvImportOptions csv_import_options = 5; + * @param \Google\Cloud\Sql\V1beta4\ImportContext\SqlCsvImportOptions $var + * @return $this + */ + public function setCsvImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext\SqlCsvImportOptions::class); + $this->csv_import_options = $var; + + return $this; + } + + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + * @return string + */ + public function getImportUser() + { + return $this->import_user; + } + + /** + * The PostgreSQL user for this import operation. PostgreSQL instances only. + * + * Generated from protobuf field string import_user = 6; + * @param string $var + * @return $this + */ + public function setImportUser($var) + { + GPBUtil::checkString($var, True); + $this->import_user = $var; + + return $this; + } + + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions bak_import_options = 7; + * @return \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions|null + */ + public function getBakImportOptions() + { + return $this->bak_import_options; + } + + public function hasBakImportOptions() + { + return isset($this->bak_import_options); + } + + public function clearBakImportOptions() + { + unset($this->bak_import_options); + } + + /** + * Import parameters specific to SQL Server .BAK files + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions bak_import_options = 7; + * @param \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions $var + * @return $this + */ + public function setBakImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions::class); + $this->bak_import_options = $var; + + return $this; + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions|null + */ + public function getSqlImportOptions() + { + return $this->sql_import_options; + } + + public function hasSqlImportOptions() + { + return isset($this->sql_import_options); + } + + public function clearSqlImportOptions() + { + unset($this->sql_import_options); + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions $var + * @return $this + */ + public function setSqlImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions::class); + $this->sql_import_options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions.php new file mode 100644 index 000000000000..6e8abc3342db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions.php @@ -0,0 +1,452 @@ +google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions + */ +class SqlBakImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + */ + protected $encryption_options = null; + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + */ + protected $striped = null; + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + */ + protected $no_recovery = null; + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + */ + protected $recovery_only = null; + /** + * Type of the bak content, FULL or DIFF. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BakType bak_type = 6; + */ + protected $bak_type = 0; + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stop_at = null; + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $stop_at_mark = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions\EncryptionOptions $encryption_options + * @type \Google\Protobuf\BoolValue $striped + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * @type \Google\Protobuf\BoolValue $no_recovery + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * @type \Google\Protobuf\BoolValue $recovery_only + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * @type int $bak_type + * Type of the bak content, FULL or DIFF. + * @type \Google\Protobuf\Timestamp $stop_at + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * @type string $stop_at_mark + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + * @return \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions\EncryptionOptions|null + */ + public function getEncryptionOptions() + { + return $this->encryption_options; + } + + public function hasEncryptionOptions() + { + return isset($this->encryption_options); + } + + public function clearEncryptionOptions() + { + unset($this->encryption_options); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions.EncryptionOptions encryption_options = 1; + * @param \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions\EncryptionOptions $var + * @return $this + */ + public function setEncryptionOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions\EncryptionOptions::class); + $this->encryption_options = $var; + + return $this; + } + + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStriped() + { + return $this->striped; + } + + public function hasStriped() + { + return isset($this->striped); + } + + public function clearStriped() + { + unset($this->striped); + } + + /** + * Returns the unboxed value from getStriped() + + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @return bool|null + */ + public function getStripedUnwrapped() + { + return $this->readWrapperValue("striped"); + } + + /** + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStriped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->striped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup set being restored is striped. + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue striped = 2; + * @param bool|null $var + * @return $this + */ + public function setStripedUnwrapped($var) + { + $this->writeWrapperValue("striped", $var); + return $this;} + + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getNoRecovery() + { + return $this->no_recovery; + } + + public function hasNoRecovery() + { + return isset($this->no_recovery); + } + + public function clearNoRecovery() + { + unset($this->no_recovery); + } + + /** + * Returns the unboxed value from getNoRecovery() + + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @return bool|null + */ + public function getNoRecoveryUnwrapped() + { + return $this->readWrapperValue("no_recovery"); + } + + /** + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setNoRecovery($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->no_recovery = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup importing will restore database + * with NORECOVERY option + * Applies only to Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue no_recovery = 4; + * @param bool|null $var + * @return $this + */ + public function setNoRecoveryUnwrapped($var) + { + $this->writeWrapperValue("no_recovery", $var); + return $this;} + + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRecoveryOnly() + { + return $this->recovery_only; + } + + public function hasRecoveryOnly() + { + return isset($this->recovery_only); + } + + public function clearRecoveryOnly() + { + unset($this->recovery_only); + } + + /** + * Returns the unboxed value from getRecoveryOnly() + + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @return bool|null + */ + public function getRecoveryOnlyUnwrapped() + { + return $this->readWrapperValue("recovery_only"); + } + + /** + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRecoveryOnly($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->recovery_only = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the backup importing request will just bring database + * online without downloading Bak content only one of "no_recovery" and + * "recovery_only" can be true otherwise error will return. Applies only to + * Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.protobuf.BoolValue recovery_only = 5; + * @param bool|null $var + * @return $this + */ + public function setRecoveryOnlyUnwrapped($var) + { + $this->writeWrapperValue("recovery_only", $var); + return $this;} + + /** + * Type of the bak content, FULL or DIFF. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BakType bak_type = 6; + * @return int + */ + public function getBakType() + { + return $this->bak_type; + } + + /** + * Type of the bak content, FULL or DIFF. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BakType bak_type = 6; + * @param int $var + * @return $this + */ + public function setBakType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BakType::class); + $this->bak_type = $var; + + return $this; + } + + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStopAt() + { + return $this->stop_at; + } + + public function hasStopAt() + { + return isset($this->stop_at); + } + + public function clearStopAt() + { + unset($this->stop_at); + } + + /** + * Optional. The timestamp when the import should stop. This timestamp is in + * the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, + * `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT + * keyword and applies to Cloud SQL for SQL Server only. + * + * Generated from protobuf field .google.protobuf.Timestamp stop_at = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStopAt($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->stop_at = $var; + + return $this; + } + + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getStopAtMark() + { + return $this->stop_at_mark; + } + + /** + * Optional. The marked transaction where the import should stop. This field + * is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL + * Server only. + * + * Generated from protobuf field string stop_at_mark = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setStopAtMark($var) + { + GPBUtil::checkString($var, True); + $this->stop_at_mark = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlBakImportOptions::class, \Google\Cloud\Sql\V1beta4\ImportContext_SqlBakImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions/EncryptionOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions/EncryptionOptions.php new file mode 100644 index 000000000000..7f84c37d517b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlBakImportOptions/EncryptionOptions.php @@ -0,0 +1,152 @@ +google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions.EncryptionOptions + */ +class EncryptionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have write permissions + * to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + */ + protected $cert_path = ''; + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have write + * permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + */ + protected $pvk_path = ''; + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + */ + protected $pvk_password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cert_path + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have write permissions + * to the bucket and read access to the file. + * @type string $pvk_path + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have write + * permissions to the bucket and read access to the file. + * @type string $pvk_password + * Password that encrypts the private key + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have write permissions + * to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + * @return string + */ + public function getCertPath() + { + return $this->cert_path; + } + + /** + * Path to the Certificate (.cer) in Cloud Storage, in the form + * `gs://bucketName/fileName`. The instance must have write permissions + * to the bucket and read access to the file. + * + * Generated from protobuf field string cert_path = 1; + * @param string $var + * @return $this + */ + public function setCertPath($var) + { + GPBUtil::checkString($var, True); + $this->cert_path = $var; + + return $this; + } + + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have write + * permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + * @return string + */ + public function getPvkPath() + { + return $this->pvk_path; + } + + /** + * Path to the Certificate Private Key (.pvk) in Cloud Storage, in the + * form `gs://bucketName/fileName`. The instance must have write + * permissions to the bucket and read access to the file. + * + * Generated from protobuf field string pvk_path = 2; + * @param string $var + * @return $this + */ + public function setPvkPath($var) + { + GPBUtil::checkString($var, True); + $this->pvk_path = $var; + + return $this; + } + + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + * @return string + */ + public function getPvkPassword() + { + return $this->pvk_password; + } + + /** + * Password that encrypts the private key + * + * Generated from protobuf field string pvk_password = 3; + * @param string $var + * @return $this + */ + public function setPvkPassword($var) + { + GPBUtil::checkString($var, True); + $this->pvk_password = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncryptionOptions::class, \Google\Cloud\Sql\V1beta4\ImportContext_SqlBakImportOptions_EncryptionOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlCsvImportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlCsvImportOptions.php new file mode 100644 index 000000000000..41631ec69573 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlCsvImportOptions.php @@ -0,0 +1,254 @@ +google.cloud.sql.v1beta4.ImportContext.SqlCsvImportOptions + */ +class SqlCsvImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + */ + private $columns; + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + */ + protected $escape_character = ''; + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + */ + protected $quote_character = ''; + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + */ + protected $fields_terminated_by = ''; + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + */ + protected $lines_terminated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * The table to which CSV data is imported. + * @type array|\Google\Protobuf\Internal\RepeatedField $columns + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * @type string $escape_character + * Specifies the character that should appear before a data character that + * needs to be escaped. + * @type string $quote_character + * Specifies the quoting character to be used when a data value is quoted. + * @type string $fields_terminated_by + * Specifies the character that separates columns within each row (line) of + * the file. + * @type string $lines_terminated_by + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * The table to which CSV data is imported. + * + * Generated from protobuf field string table = 1; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The columns to which CSV data is imported. If not specified, all columns + * of the database table are loaded with CSV data. + * + * Generated from protobuf field repeated string columns = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->columns = $arr; + + return $this; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + * @return string + */ + public function getEscapeCharacter() + { + return $this->escape_character; + } + + /** + * Specifies the character that should appear before a data character that + * needs to be escaped. + * + * Generated from protobuf field string escape_character = 4; + * @param string $var + * @return $this + */ + public function setEscapeCharacter($var) + { + GPBUtil::checkString($var, True); + $this->escape_character = $var; + + return $this; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + * @return string + */ + public function getQuoteCharacter() + { + return $this->quote_character; + } + + /** + * Specifies the quoting character to be used when a data value is quoted. + * + * Generated from protobuf field string quote_character = 5; + * @param string $var + * @return $this + */ + public function setQuoteCharacter($var) + { + GPBUtil::checkString($var, True); + $this->quote_character = $var; + + return $this; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + * @return string + */ + public function getFieldsTerminatedBy() + { + return $this->fields_terminated_by; + } + + /** + * Specifies the character that separates columns within each row (line) of + * the file. + * + * Generated from protobuf field string fields_terminated_by = 6; + * @param string $var + * @return $this + */ + public function setFieldsTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->fields_terminated_by = $var; + + return $this; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + * @return string + */ + public function getLinesTerminatedBy() + { + return $this->lines_terminated_by; + } + + /** + * This is used to separate lines. If a line does not contain all fields, + * the rest of the columns are set to their default values. + * + * Generated from protobuf field string lines_terminated_by = 8; + * @param string $var + * @return $this + */ + public function setLinesTerminatedBy($var) + { + GPBUtil::checkString($var, True); + $this->lines_terminated_by = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlCsvImportOptions::class, \Google\Cloud\Sql\V1beta4\ImportContext_SqlCsvImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlImportOptions.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlImportOptions.php new file mode 100644 index 000000000000..d035d3566092 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ImportContext/SqlImportOptions.php @@ -0,0 +1,176 @@ +google.cloud.sql.v1beta4.ImportContext.SqlImportOptions + */ +class SqlImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $threads = null; + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parallel = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel import. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the import should be parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsUnwrapped() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsUnwrapped($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelUnwrapped() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelUnwrapped($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlImportOptions::class, \Google\Cloud\Sql\V1beta4\ImportContext_SqlImportOptions::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InsightsConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InsightsConfig.php new file mode 100644 index 000000000000..09205708f1f8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InsightsConfig.php @@ -0,0 +1,306 @@ +google.cloud.sql.v1beta4.InsightsConfig + */ +class InsightsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + */ + protected $query_insights_enabled = false; + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + */ + protected $record_client_address = false; + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + */ + protected $record_application_tags = false; + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + */ + protected $query_string_length = null; + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + */ + protected $query_plans_per_minute = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $query_insights_enabled + * Whether Query Insights feature is enabled. + * @type bool $record_client_address + * Whether Query Insights will record client address when enabled. + * @type bool $record_application_tags + * Whether Query Insights will record application tags from query when + * enabled. + * @type \Google\Protobuf\Int32Value $query_string_length + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * @type \Google\Protobuf\Int32Value $query_plans_per_minute + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + * @return bool + */ + public function getQueryInsightsEnabled() + { + return $this->query_insights_enabled; + } + + /** + * Whether Query Insights feature is enabled. + * + * Generated from protobuf field bool query_insights_enabled = 1; + * @param bool $var + * @return $this + */ + public function setQueryInsightsEnabled($var) + { + GPBUtil::checkBool($var); + $this->query_insights_enabled = $var; + + return $this; + } + + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + * @return bool + */ + public function getRecordClientAddress() + { + return $this->record_client_address; + } + + /** + * Whether Query Insights will record client address when enabled. + * + * Generated from protobuf field bool record_client_address = 2; + * @param bool $var + * @return $this + */ + public function setRecordClientAddress($var) + { + GPBUtil::checkBool($var); + $this->record_client_address = $var; + + return $this; + } + + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + * @return bool + */ + public function getRecordApplicationTags() + { + return $this->record_application_tags; + } + + /** + * Whether Query Insights will record application tags from query when + * enabled. + * + * Generated from protobuf field bool record_application_tags = 3; + * @param bool $var + * @return $this + */ + public function setRecordApplicationTags($var) + { + GPBUtil::checkBool($var); + $this->record_application_tags = $var; + + return $this; + } + + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @return \Google\Protobuf\Int32Value|null + */ + public function getQueryStringLength() + { + return $this->query_string_length; + } + + public function hasQueryStringLength() + { + return isset($this->query_string_length); + } + + public function clearQueryStringLength() + { + unset($this->query_string_length); + } + + /** + * Returns the unboxed value from getQueryStringLength() + + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @return int|null + */ + public function getQueryStringLengthUnwrapped() + { + return $this->readWrapperValue("query_string_length"); + } + + /** + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQueryStringLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->query_string_length = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Maximum query length stored in bytes. Default value: 1024 bytes. + * Range: 256-4500 bytes. Query length more than this field value will be + * truncated to this value. When unset, query length will be the default + * value. Changing query length will restart the database. + * + * Generated from protobuf field .google.protobuf.Int32Value query_string_length = 4; + * @param int|null $var + * @return $this + */ + public function setQueryStringLengthUnwrapped($var) + { + $this->writeWrapperValue("query_string_length", $var); + return $this;} + + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getQueryPlansPerMinute() + { + return $this->query_plans_per_minute; + } + + public function hasQueryPlansPerMinute() + { + return isset($this->query_plans_per_minute); + } + + public function clearQueryPlansPerMinute() + { + unset($this->query_plans_per_minute); + } + + /** + * Returns the unboxed value from getQueryPlansPerMinute() + + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @return int|null + */ + public function getQueryPlansPerMinuteUnwrapped() + { + return $this->readWrapperValue("query_plans_per_minute"); + } + + /** + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setQueryPlansPerMinute($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->query_plans_per_minute = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Number of query execution plans captured by Insights per minute + * for all queries combined. Default is 5. + * + * Generated from protobuf field .google.protobuf.Int32Value query_plans_per_minute = 5; + * @param int|null $var + * @return $this + */ + public function setQueryPlansPerMinuteUnwrapped($var) + { + $this->writeWrapperValue("query_plans_per_minute", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstanceReference.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstanceReference.php new file mode 100644 index 000000000000..bd2182b8cefe --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstanceReference.php @@ -0,0 +1,143 @@ +google.cloud.sql.v1beta4.InstanceReference + */ +class InstanceReference extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + */ + protected $region = ''; + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * @type string $region + * The region of the Cloud SQL instance being referenced. + * @type string $project + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Cloud SQL instance being referenced. + * This does not include the project ID. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region of the Cloud SQL instance being referenced. + * + * Generated from protobuf field string region = 2; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the Cloud SQL instance being referenced. + * The default is the same project ID as the instance references it. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..cfc4b9f62f5c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest + */ +class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + */ + protected $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * Contains details about the acquire SSRS lease operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @return \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @param \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesCloneRequest.php new file mode 100644 index 000000000000..29389f6d841e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesCloneRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesCloneRequest + */ +class InstancesCloneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.CloneContext clone_context = 1; + */ + protected $clone_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\CloneContext $clone_context + * Contains details about the clone operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.CloneContext clone_context = 1; + * @return \Google\Cloud\Sql\V1beta4\CloneContext|null + */ + public function getCloneContext() + { + return $this->clone_context; + } + + public function hasCloneContext() + { + return isset($this->clone_context); + } + + public function clearCloneContext() + { + unset($this->clone_context); + } + + /** + * Contains details about the clone operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.CloneContext clone_context = 1; + * @param \Google\Cloud\Sql\V1beta4\CloneContext $var + * @return $this + */ + public function setCloneContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\CloneContext::class); + $this->clone_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteMasterRequest.php new file mode 100644 index 000000000000..53c47a02a380 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteMasterRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesDemoteMasterRequest + */ +class InstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterContext demote_master_context = 1; + */ + protected $demote_master_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\DemoteMasterContext $demote_master_context + * Contains details about the demoteMaster operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterContext demote_master_context = 1; + * @return \Google\Cloud\Sql\V1beta4\DemoteMasterContext|null + */ + public function getDemoteMasterContext() + { + return $this->demote_master_context; + } + + public function hasDemoteMasterContext() + { + return isset($this->demote_master_context); + } + + public function clearDemoteMasterContext() + { + unset($this->demote_master_context); + } + + /** + * Contains details about the demoteMaster operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteMasterContext demote_master_context = 1; + * @param \Google\Cloud\Sql\V1beta4\DemoteMasterContext $var + * @return $this + */ + public function setDemoteMasterContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DemoteMasterContext::class); + $this->demote_master_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteRequest.php new file mode 100644 index 000000000000..8fa577245bd4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesDemoteRequest.php @@ -0,0 +1,82 @@ +google.cloud.sql.v1beta4.InstancesDemoteRequest + */ +class InstancesDemoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. This context is used to demote an existing standalone instance to + * be a Cloud SQL read replica for an external database server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $demote_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\DemoteContext $demote_context + * Required. This context is used to demote an existing standalone instance to + * be a Cloud SQL read replica for an external database server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. This context is used to demote an existing standalone instance to + * be a Cloud SQL read replica for an external database server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1beta4\DemoteContext|null + */ + public function getDemoteContext() + { + return $this->demote_context; + } + + public function hasDemoteContext() + { + return isset($this->demote_context); + } + + public function clearDemoteContext() + { + unset($this->demote_context); + } + + /** + * Required. This context is used to demote an existing standalone instance to + * be a Cloud SQL read replica for an external database server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DemoteContext demote_context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1beta4\DemoteContext $var + * @return $this + */ + public function setDemoteContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DemoteContext::class); + $this->demote_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesExportRequest.php new file mode 100644 index 000000000000..f95fc933c5c0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesExportRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesExportRequest + */ +class InstancesExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext export_context = 1; + */ + protected $export_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\ExportContext $export_context + * Contains details about the export operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext export_context = 1; + * @return \Google\Cloud\Sql\V1beta4\ExportContext|null + */ + public function getExportContext() + { + return $this->export_context; + } + + public function hasExportContext() + { + return isset($this->export_context); + } + + public function clearExportContext() + { + unset($this->export_context); + } + + /** + * Contains details about the export operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext export_context = 1; + * @param \Google\Cloud\Sql\V1beta4\ExportContext $var + * @return $this + */ + public function setExportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ExportContext::class); + $this->export_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesFailoverRequest.php new file mode 100644 index 000000000000..d3c86bc2dbe9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesFailoverRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesFailoverRequest + */ +class InstancesFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.FailoverContext failover_context = 1; + */ + protected $failover_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\FailoverContext $failover_context + * Failover Context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.FailoverContext failover_context = 1; + * @return \Google\Cloud\Sql\V1beta4\FailoverContext|null + */ + public function getFailoverContext() + { + return $this->failover_context; + } + + public function hasFailoverContext() + { + return isset($this->failover_context); + } + + public function clearFailoverContext() + { + unset($this->failover_context); + } + + /** + * Failover Context. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.FailoverContext failover_context = 1; + * @param \Google\Cloud\Sql\V1beta4\FailoverContext $var + * @return $this + */ + public function setFailoverContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\FailoverContext::class); + $this->failover_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesImportRequest.php new file mode 100644 index 000000000000..fa374c44968f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesImportRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesImportRequest + */ +class InstancesImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext import_context = 1; + */ + protected $import_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\ImportContext $import_context + * Contains details about the import operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext import_context = 1; + * @return \Google\Cloud\Sql\V1beta4\ImportContext|null + */ + public function getImportContext() + { + return $this->import_context; + } + + public function hasImportContext() + { + return isset($this->import_context); + } + + public function clearImportContext() + { + unset($this->import_context); + } + + /** + * Contains details about the import operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext import_context = 1; + * @param \Google\Cloud\Sql\V1beta4\ImportContext $var + * @return $this + */ + public function setImportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext::class); + $this->import_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListResponse.php new file mode 100644 index 000000000000..d2e20b973b98 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListResponse.php @@ -0,0 +1,173 @@ +google.cloud.sql.v1beta4.InstancesListResponse + */ +class InstancesListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.ApiWarning warnings = 2; + */ + private $warnings; + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DatabaseInstance items = 3; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#instancesList`. + * @type array<\Google\Cloud\Sql\V1beta4\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $warnings + * List of warnings that occurred while handling the request. + * @type array<\Google\Cloud\Sql\V1beta4\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $items + * List of database instance resources. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instancesList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.ApiWarning warnings = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * List of warnings that occurred while handling the request. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.ApiWarning warnings = 2; + * @param array<\Google\Cloud\Sql\V1beta4\ApiWarning>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\ApiWarning::class); + $this->warnings = $arr; + + return $this; + } + + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DatabaseInstance items = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of database instance resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DatabaseInstance items = 3; + * @param array<\Google\Cloud\Sql\V1beta4\DatabaseInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\DatabaseInstance::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 4; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListServerCasResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListServerCasResponse.php new file mode 100644 index 000000000000..1883773ace02 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesListServerCasResponse.php @@ -0,0 +1,128 @@ +google.cloud.sql.v1beta4.InstancesListServerCasResponse + */ +class InstancesListServerCasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SslCert certs = 1; + */ + private $certs; + /** + * Generated from protobuf field string active_version = 2; + */ + protected $active_version = ''; + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Sql\V1beta4\SslCert>|\Google\Protobuf\Internal\RepeatedField $certs + * List of server CA certificates for the instance. + * @type string $active_version + * @type string $kind + * This is always `sql#instancesListServerCas`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SslCert certs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCerts() + { + return $this->certs; + } + + /** + * List of server CA certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SslCert certs = 1; + * @param array<\Google\Cloud\Sql\V1beta4\SslCert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->certs = $arr; + + return $this; + } + + /** + * Generated from protobuf field string active_version = 2; + * @return string + */ + public function getActiveVersion() + { + return $this->active_version; + } + + /** + * Generated from protobuf field string active_version = 2; + * @param string $var + * @return $this + */ + public function setActiveVersion($var) + { + GPBUtil::checkString($var, True); + $this->active_version = $var; + + return $this; + } + + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#instancesListServerCas`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesReencryptRequest.php new file mode 100644 index 000000000000..422bf9722780 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesReencryptRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesReencryptRequest + */ +class InstancesReencryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupReencryptionConfig backup_reencryption_config = 1; + */ + protected $backup_reencryption_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\BackupReencryptionConfig $backup_reencryption_config + * Configuration specific to backup re-encryption + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupReencryptionConfig backup_reencryption_config = 1; + * @return \Google\Cloud\Sql\V1beta4\BackupReencryptionConfig|null + */ + public function getBackupReencryptionConfig() + { + return $this->backup_reencryption_config; + } + + public function hasBackupReencryptionConfig() + { + return isset($this->backup_reencryption_config); + } + + public function clearBackupReencryptionConfig() + { + unset($this->backup_reencryption_config); + } + + /** + * Configuration specific to backup re-encryption + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupReencryptionConfig backup_reencryption_config = 1; + * @param \Google\Cloud\Sql\V1beta4\BackupReencryptionConfig $var + * @return $this + */ + public function setBackupReencryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\BackupReencryptionConfig::class); + $this->backup_reencryption_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRestoreBackupRequest.php new file mode 100644 index 000000000000..e3219bf08a7b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRestoreBackupRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesRestoreBackupRequest + */ +class InstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.RestoreBackupContext restore_backup_context = 1; + */ + protected $restore_backup_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\RestoreBackupContext $restore_backup_context + * Parameters required to perform the restore backup operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.RestoreBackupContext restore_backup_context = 1; + * @return \Google\Cloud\Sql\V1beta4\RestoreBackupContext|null + */ + public function getRestoreBackupContext() + { + return $this->restore_backup_context; + } + + public function hasRestoreBackupContext() + { + return isset($this->restore_backup_context); + } + + public function clearRestoreBackupContext() + { + unset($this->restore_backup_context); + } + + /** + * Parameters required to perform the restore backup operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.RestoreBackupContext restore_backup_context = 1; + * @param \Google\Cloud\Sql\V1beta4\RestoreBackupContext $var + * @return $this + */ + public function setRestoreBackupContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\RestoreBackupContext::class); + $this->restore_backup_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRotateServerCaRequest.php new file mode 100644 index 000000000000..7f52c0da0bf2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesRotateServerCaRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesRotateServerCaRequest + */ +class InstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.RotateServerCaContext rotate_server_ca_context = 1; + */ + protected $rotate_server_ca_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\RotateServerCaContext $rotate_server_ca_context + * Contains details about the rotate server CA operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.RotateServerCaContext rotate_server_ca_context = 1; + * @return \Google\Cloud\Sql\V1beta4\RotateServerCaContext|null + */ + public function getRotateServerCaContext() + { + return $this->rotate_server_ca_context; + } + + public function hasRotateServerCaContext() + { + return isset($this->rotate_server_ca_context); + } + + public function clearRotateServerCaContext() + { + unset($this->rotate_server_ca_context); + } + + /** + * Contains details about the rotate server CA operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.RotateServerCaContext rotate_server_ca_context = 1; + * @param \Google\Cloud\Sql\V1beta4\RotateServerCaContext $var + * @return $this + */ + public function setRotateServerCaContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\RotateServerCaContext::class); + $this->rotate_server_ca_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesTruncateLogRequest.php new file mode 100644 index 000000000000..77ee6583ab43 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/InstancesTruncateLogRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesTruncateLogRequest + */ +class InstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.TruncateLogContext truncate_log_context = 1; + */ + protected $truncate_log_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\TruncateLogContext $truncate_log_context + * Contains details about the truncate log operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.TruncateLogContext truncate_log_context = 1; + * @return \Google\Cloud\Sql\V1beta4\TruncateLogContext|null + */ + public function getTruncateLogContext() + { + return $this->truncate_log_context; + } + + public function hasTruncateLogContext() + { + return isset($this->truncate_log_context); + } + + public function clearTruncateLogContext() + { + unset($this->truncate_log_context); + } + + /** + * Contains details about the truncate log operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.TruncateLogContext truncate_log_context = 1; + * @param \Google\Cloud\Sql\V1beta4\TruncateLogContext $var + * @return $this + */ + public function setTruncateLogContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\TruncateLogContext::class); + $this->truncate_log_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration.php new file mode 100644 index 000000000000..3edb49557e75 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration.php @@ -0,0 +1,574 @@ +google.cloud.sql.v1beta4.IpConfiguration + */ +class IpConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + */ + protected $ipv4_enabled = null; + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + */ + protected $private_network = ''; + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the legacy `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + */ + protected $require_ssl = null; + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4; + */ + private $authorized_networks; + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + */ + protected $allocated_ip_range = ''; + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + */ + protected $enable_private_path_for_google_cloud_services = null; + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8; + */ + protected $ssl_mode = 0; + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9; + */ + protected $psc_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\BoolValue $ipv4_enabled + * Whether the instance is assigned a public IP address or not. + * @type string $private_network + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * @type \Google\Protobuf\BoolValue $require_ssl + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the legacy `require_ssl` flag. + * @type array<\Google\Cloud\Sql\V1beta4\AclEntry>|\Google\Protobuf\Internal\RepeatedField $authorized_networks + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * @type string $allocated_ip_range + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * @type \Google\Protobuf\BoolValue $enable_private_path_for_google_cloud_services + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * @type int $ssl_mode + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * @type \Google\Cloud\Sql\V1beta4\PscConfig $psc_config + * PSC settings for this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIpv4Enabled() + { + return $this->ipv4_enabled; + } + + public function hasIpv4Enabled() + { + return isset($this->ipv4_enabled); + } + + public function clearIpv4Enabled() + { + unset($this->ipv4_enabled); + } + + /** + * Returns the unboxed value from getIpv4Enabled() + + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @return bool|null + */ + public function getIpv4EnabledUnwrapped() + { + return $this->readWrapperValue("ipv4_enabled"); + } + + /** + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIpv4Enabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->ipv4_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether the instance is assigned a public IP address or not. + * + * Generated from protobuf field .google.protobuf.BoolValue ipv4_enabled = 1; + * @param bool|null $var + * @return $this + */ + public function setIpv4EnabledUnwrapped($var) + { + $this->writeWrapperValue("ipv4_enabled", $var); + return $this;} + + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + * @return string + */ + public function getPrivateNetwork() + { + return $this->private_network; + } + + /** + * The resource link for the VPC network from which the Cloud SQL instance is + * accessible for private IP. For example, + * `/projects/myProject/global/networks/default`. This setting can + * be updated, but it cannot be removed after it is set. + * + * Generated from protobuf field string private_network = 2; + * @param string $var + * @return $this + */ + public function setPrivateNetwork($var) + { + GPBUtil::checkString($var, True); + $this->private_network = $var; + + return $this; + } + + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the legacy `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getRequireSsl() + { + return $this->require_ssl; + } + + public function hasRequireSsl() + { + return isset($this->require_ssl); + } + + public function clearRequireSsl() + { + unset($this->require_ssl); + } + + /** + * Returns the unboxed value from getRequireSsl() + + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the legacy `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @return bool|null + */ + public function getRequireSslUnwrapped() + { + return $this->readWrapperValue("require_ssl"); + } + + /** + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the legacy `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setRequireSsl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->require_ssl = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Use `ssl_mode` instead. + * Whether SSL/TLS connections over IP are enforced. + * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. + * For SSL/TLS connections, the client certificate won't be verified. If + * set to true, then only allow connections encrypted with SSL/TLS and with + * valid client certificates. If you want to enforce SSL/TLS without enforcing + * the requirement for valid client certificates, then use the `ssl_mode` flag + * instead of the legacy `require_ssl` flag. + * + * Generated from protobuf field .google.protobuf.BoolValue require_ssl = 3; + * @param bool|null $var + * @return $this + */ + public function setRequireSslUnwrapped($var) + { + $this->writeWrapperValue("require_ssl", $var); + return $this;} + + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizedNetworks() + { + return $this->authorized_networks; + } + + /** + * The list of external networks that are allowed to connect to the instance + * using the IP. In 'CIDR' notation, also known as 'slash' notation (for + * example: `157.197.200.0/24`). + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.AclEntry authorized_networks = 4; + * @param array<\Google\Cloud\Sql\V1beta4\AclEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizedNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\AclEntry::class); + $this->authorized_networks = $arr; + + return $this; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + * @return string + */ + public function getAllocatedIpRange() + { + return $this->allocated_ip_range; + } + + /** + * The name of the allocated ip range for the private ip Cloud SQL instance. + * For example: "google-managed-services-default". If set, the instance ip + * will be created in the allocated range. The range name must comply with + * [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name + * must be 1-63 characters long and match the regular expression + * `[a-z]([-a-z0-9]*[a-z0-9])?.` + * + * Generated from protobuf field string allocated_ip_range = 6; + * @param string $var + * @return $this + */ + public function setAllocatedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->allocated_ip_range = $var; + + return $this; + } + + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnablePrivatePathForGoogleCloudServices() + { + return $this->enable_private_path_for_google_cloud_services; + } + + public function hasEnablePrivatePathForGoogleCloudServices() + { + return isset($this->enable_private_path_for_google_cloud_services); + } + + public function clearEnablePrivatePathForGoogleCloudServices() + { + unset($this->enable_private_path_for_google_cloud_services); + } + + /** + * Returns the unboxed value from getEnablePrivatePathForGoogleCloudServices() + + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @return bool|null + */ + public function getEnablePrivatePathForGoogleCloudServicesUnwrapped() + { + return $this->readWrapperValue("enable_private_path_for_google_cloud_services"); + } + + /** + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnablePrivatePathForGoogleCloudServices($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_private_path_for_google_cloud_services = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Controls connectivity to private IP instances from Google services, + * such as BigQuery. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_private_path_for_google_cloud_services = 7; + * @param bool|null $var + * @return $this + */ + public function setEnablePrivatePathForGoogleCloudServicesUnwrapped($var) + { + $this->writeWrapperValue("enable_private_path_for_google_cloud_services", $var); + return $this;} + + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8; + * @return int + */ + public function getSslMode() + { + return $this->ssl_mode; + } + + /** + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` + * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` + * The value of `ssl_mode` gets priority over the value of `require_ssl`. For + * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, + * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the + * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL + * and PostgreSQL databases respect `ssl_mode` in this case and accept only + * SSL connections. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8; + * @param int $var + * @return $this + */ + public function setSslMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\IpConfiguration\SslMode::class); + $this->ssl_mode = $var; + + return $this; + } + + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9; + * @return \Google\Cloud\Sql\V1beta4\PscConfig|null + */ + public function getPscConfig() + { + return $this->psc_config; + } + + public function hasPscConfig() + { + return isset($this->psc_config); + } + + public function clearPscConfig() + { + unset($this->psc_config); + } + + /** + * PSC settings for this instance. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.PscConfig psc_config = 9; + * @param \Google\Cloud\Sql\V1beta4\PscConfig $var + * @return $this + */ + public function setPscConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\PscConfig::class); + $this->psc_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration/SslMode.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration/SslMode.php new file mode 100644 index 000000000000..e9d91dd6512e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpConfiguration/SslMode.php @@ -0,0 +1,87 @@ +google.cloud.sql.v1beta4.IpConfiguration.SslMode + */ +class SslMode +{ + /** + * The SSL mode is unknown. + * + * Generated from protobuf enum SSL_MODE_UNSPECIFIED = 0; + */ + const SSL_MODE_UNSPECIFIED = 0; + /** + * Allow non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, + * the client certificate won't be verified. + * When this value is used, the legacy `require_ssl` flag must be false or + * cleared to avoid the conflict between values of two flags. + * + * Generated from protobuf enum ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; + */ + const ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1; + /** + * Only allow connections encrypted with SSL/TLS. + * When this value is used, the legacy `require_ssl` flag must be false or + * cleared to avoid the conflict between values of two flags. + * + * Generated from protobuf enum ENCRYPTED_ONLY = 2; + */ + const ENCRYPTED_ONLY = 2; + /** + * Only allow connections encrypted with SSL/TLS and with valid + * client certificates. + * When this value is used, the legacy `require_ssl` flag must be true or + * cleared to avoid the conflict between values of two flags. + * PostgreSQL clients or users that connect using IAM database + * authentication must use either the + * [Cloud SQL Auth + * Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or + * [Cloud SQL + * Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) + * to enforce client identity verification. + * This value is not applicable to SQL Server. + * + * Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; + */ + const TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; + + private static $valueToName = [ + self::SSL_MODE_UNSPECIFIED => 'SSL_MODE_UNSPECIFIED', + self::ALLOW_UNENCRYPTED_AND_ENCRYPTED => 'ALLOW_UNENCRYPTED_AND_ENCRYPTED', + self::ENCRYPTED_ONLY => 'ENCRYPTED_ONLY', + self::TRUSTED_CLIENT_CERTIFICATE_REQUIRED => 'TRUSTED_CLIENT_CERTIFICATE_REQUIRED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SslMode::class, \Google\Cloud\Sql\V1beta4\IpConfiguration_SslMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpMapping.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpMapping.php new file mode 100644 index 000000000000..67df7d574697 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/IpMapping.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1beta4.IpMapping + */ +class IpMapping extends \Google\Protobuf\Internal\Message +{ + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlIpAddressType type = 1; + */ + protected $type = 0; + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + */ + protected $ip_address = ''; + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + */ + protected $time_to_retire = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * @type string $ip_address + * The IP address assigned. + * @type \Google\Protobuf\Timestamp $time_to_retire + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlIpAddressType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this IP address. A `PRIMARY` address is a public address that + * can accept incoming connections. A `PRIVATE` address is a private address + * that can accept incoming connections. An `OUTGOING` address is the source + * address of connections originating from the instance, if supported. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlIpAddressType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlIpAddressType::class); + $this->type = $var; + + return $this; + } + + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address assigned. + * + * Generated from protobuf field string ip_address = 2; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeToRetire() + { + return $this->time_to_retire; + } + + public function hasTimeToRetire() + { + return isset($this->time_to_retire); + } + + public function clearTimeToRetire() + { + unset($this->time_to_retire); + } + + /** + * The due time for this IP to be retired in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. This field is only available when + * the IP is scheduled to be retired. + * + * Generated from protobuf field .google.protobuf.Timestamp time_to_retire = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeToRetire($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_to_retire = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/LocationPreference.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/LocationPreference.php new file mode 100644 index 000000000000..76e21b9e21c8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/LocationPreference.php @@ -0,0 +1,193 @@ +google.cloud.sql.v1beta4.LocationPreference + */ +class LocationPreference extends \Google\Protobuf\Internal\Message +{ + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @deprecated + */ + protected $follow_gae_application = ''; + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + */ + protected $zone = ''; + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + */ + protected $secondary_zone = ''; + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $follow_gae_application + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * @type string $zone + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * @type string $secondary_zone + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * @type string $kind + * This is always `sql#locationPreference`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getFollowGaeApplication() + { + @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); + return $this->follow_gae_application; + } + + /** + * The App Engine application to follow, it must be in the same region as the + * Cloud SQL instance. WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string follow_gae_application = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setFollowGaeApplication($var) + { + @trigger_error('follow_gae_application is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->follow_gae_application = $var; + + return $this; + } + + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The preferred Compute Engine zone (for example: us-central1-a, + * us-central1-b, etc.). WARNING: Changing this might restart the instance. + * + * Generated from protobuf field string zone = 2; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + * @return string + */ + public function getSecondaryZone() + { + return $this->secondary_zone; + } + + /** + * The preferred Compute Engine zone for the secondary/failover + * (for example: us-central1-a, us-central1-b, etc.). + * To disable this field, set it to 'no_secondary_zone'. + * + * Generated from protobuf field string secondary_zone = 4; + * @param string $var + * @return $this + */ + public function setSecondaryZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_zone = $var; + + return $this; + } + + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#locationPreference`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MaintenanceWindow.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MaintenanceWindow.php new file mode 100644 index 000000000000..8d9620b9a54a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MaintenanceWindow.php @@ -0,0 +1,252 @@ +google.cloud.sql.v1beta4.MaintenanceWindow + */ +class MaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + */ + protected $hour = null; + /** + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + */ + protected $day = null; + /** + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlUpdateTrack update_track = 3; + */ + protected $update_track = 0; + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $hour + * hour of day - 0 to 23. + * @type \Google\Protobuf\Int32Value $day + * day of week (1-7), starting on Monday. + * @type int $update_track + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * @type string $kind + * This is always `sql#maintenanceWindow`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getHour() + { + return $this->hour; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Returns the unboxed value from getHour() + + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @return int|null + */ + public function getHourUnwrapped() + { + return $this->readWrapperValue("hour"); + } + + /** + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->hour = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * hour of day - 0 to 23. + * + * Generated from protobuf field .google.protobuf.Int32Value hour = 1; + * @param int|null $var + * @return $this + */ + public function setHourUnwrapped($var) + { + $this->writeWrapperValue("hour", $var); + return $this;} + + /** + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getDay() + { + return $this->day; + } + + public function hasDay() + { + return isset($this->day); + } + + public function clearDay() + { + unset($this->day); + } + + /** + * Returns the unboxed value from getDay() + + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @return int|null + */ + public function getDayUnwrapped() + { + return $this->readWrapperValue("day"); + } + + /** + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->day = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * day of week (1-7), starting on Monday. + * + * Generated from protobuf field .google.protobuf.Int32Value day = 2; + * @param int|null $var + * @return $this + */ + public function setDayUnwrapped($var) + { + $this->writeWrapperValue("day", $var); + return $this;} + + /** + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlUpdateTrack update_track = 3; + * @return int + */ + public function getUpdateTrack() + { + return $this->update_track; + } + + /** + * Maintenance timing setting: `canary` (Earlier) or `stable` (Later). + * [Learn + * more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen). + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlUpdateTrack update_track = 3; + * @param int $var + * @return $this + */ + public function setUpdateTrack($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlUpdateTrack::class); + $this->update_track = $var; + + return $this; + } + + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#maintenanceWindow`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlReplicaConfiguration.php new file mode 100644 index 000000000000..0f3f2dc6b289 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlReplicaConfiguration.php @@ -0,0 +1,548 @@ +google.cloud.sql.v1beta4.MySqlReplicaConfiguration + */ +class MySqlReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + */ + protected $dump_file_path = ''; + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + */ + protected $password = ''; + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + */ + protected $connect_retry_interval = null; + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + */ + protected $master_heartbeat_period = null; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + */ + protected $ca_certificate = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + */ + protected $client_certificate = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + */ + protected $client_key = ''; + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + */ + protected $ssl_cipher = ''; + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + */ + protected $verify_server_certificate = null; + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + */ + protected $kind = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dump_file_path + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * @type string $username + * The username for the replication connection. + * @type string $password + * The password for the replication connection. + * @type \Google\Protobuf\Int32Value $connect_retry_interval + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * @type \Google\Protobuf\Int64Value $master_heartbeat_period + * Interval in milliseconds between replication heartbeats. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * @type string $ssl_cipher + * A list of permissible ciphers to use for SSL encryption. + * @type \Google\Protobuf\BoolValue $verify_server_certificate + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * @type string $kind + * This is always `sql#mysqlReplicaConfiguration`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + * @return string + */ + public function getDumpFilePath() + { + return $this->dump_file_path; + } + + /** + * Path to a SQL dump file in Google Cloud Storage from which the replica + * instance is to be created. The URI is in the form gs://bucketName/fileName. + * Compressed gzip files (.gz) are also supported. + * Dumps have the binlog co-ordinates from which replication + * begins. This can be accomplished by setting --master-data to 1 when using + * mysqldump. + * + * Generated from protobuf field string dump_file_path = 1; + * @param string $var + * @return $this + */ + public function setDumpFilePath($var) + { + GPBUtil::checkString($var, True); + $this->dump_file_path = $var; + + return $this; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for the replication connection. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the replication connection. + * + * Generated from protobuf field string password = 3; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @return \Google\Protobuf\Int32Value|null + */ + public function getConnectRetryInterval() + { + return $this->connect_retry_interval; + } + + public function hasConnectRetryInterval() + { + return isset($this->connect_retry_interval); + } + + public function clearConnectRetryInterval() + { + unset($this->connect_retry_interval); + } + + /** + * Returns the unboxed value from getConnectRetryInterval() + + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @return int|null + */ + public function getConnectRetryIntervalUnwrapped() + { + return $this->readWrapperValue("connect_retry_interval"); + } + + /** + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setConnectRetryInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->connect_retry_interval = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Seconds to wait between connect retries. MySQL's default is 60 seconds. + * + * Generated from protobuf field .google.protobuf.Int32Value connect_retry_interval = 4; + * @param int|null $var + * @return $this + */ + public function setConnectRetryIntervalUnwrapped($var) + { + $this->writeWrapperValue("connect_retry_interval", $var); + return $this;} + + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @return \Google\Protobuf\Int64Value|null + */ + public function getMasterHeartbeatPeriod() + { + return $this->master_heartbeat_period; + } + + public function hasMasterHeartbeatPeriod() + { + return isset($this->master_heartbeat_period); + } + + public function clearMasterHeartbeatPeriod() + { + unset($this->master_heartbeat_period); + } + + /** + * Returns the unboxed value from getMasterHeartbeatPeriod() + + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @return int|string|null + */ + public function getMasterHeartbeatPeriodUnwrapped() + { + return $this->readWrapperValue("master_heartbeat_period"); + } + + /** + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setMasterHeartbeatPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->master_heartbeat_period = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Interval in milliseconds between replication heartbeats. + * + * Generated from protobuf field .google.protobuf.Int64Value master_heartbeat_period = 5; + * @param int|string|null $var + * @return $this + */ + public function setMasterHeartbeatPeriodUnwrapped($var) + { + $this->writeWrapperValue("master_heartbeat_period", $var); + return $this;} + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 6; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 7; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 8; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + * @return string + */ + public function getSslCipher() + { + return $this->ssl_cipher; + } + + /** + * A list of permissible ciphers to use for SSL encryption. + * + * Generated from protobuf field string ssl_cipher = 9; + * @param string $var + * @return $this + */ + public function setSslCipher($var) + { + GPBUtil::checkString($var, True); + $this->ssl_cipher = $var; + + return $this; + } + + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @return \Google\Protobuf\BoolValue|null + */ + public function getVerifyServerCertificate() + { + return $this->verify_server_certificate; + } + + public function hasVerifyServerCertificate() + { + return isset($this->verify_server_certificate); + } + + public function clearVerifyServerCertificate() + { + unset($this->verify_server_certificate); + } + + /** + * Returns the unboxed value from getVerifyServerCertificate() + + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @return bool|null + */ + public function getVerifyServerCertificateUnwrapped() + { + return $this->readWrapperValue("verify_server_certificate"); + } + + /** + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setVerifyServerCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->verify_server_certificate = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not to check the primary instance's Common Name value in the + * certificate that it sends during the SSL handshake. + * + * Generated from protobuf field .google.protobuf.BoolValue verify_server_certificate = 10; + * @param bool|null $var + * @return $this + */ + public function setVerifyServerCertificateUnwrapped($var) + { + $this->writeWrapperValue("verify_server_certificate", $var); + return $this;} + + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#mysqlReplicaConfiguration`. + * + * Generated from protobuf field string kind = 11; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlSyncConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlSyncConfig.php new file mode 100644 index 000000000000..74d504b4c994 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/MySqlSyncConfig.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1beta4.MySqlSyncConfig + */ +class MySqlSyncConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SyncFlags initial_sync_flags = 1; + */ + private $initial_sync_flags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Sql\V1beta4\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $initial_sync_flags + * Flags to use for the initial dump. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SyncFlags initial_sync_flags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInitialSyncFlags() + { + return $this->initial_sync_flags; + } + + /** + * Flags to use for the initial dump. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SyncFlags initial_sync_flags = 1; + * @param array<\Google\Cloud\Sql\V1beta4\SyncFlags>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInitialSyncFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\SyncFlags::class); + $this->initial_sync_flags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OnPremisesConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OnPremisesConfiguration.php new file mode 100644 index 000000000000..053792bafd85 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OnPremisesConfiguration.php @@ -0,0 +1,353 @@ +google.cloud.sql.v1beta4.OnPremisesConfiguration + */ +class OnPremisesConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + */ + protected $host_port = ''; + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + */ + protected $kind = ''; + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + */ + protected $username = ''; + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + */ + protected $password = ''; + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + */ + protected $ca_certificate = ''; + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + */ + protected $client_certificate = ''; + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + */ + protected $client_key = ''; + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + */ + protected $dump_file_path = ''; + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstanceReference source_instance = 15; + */ + protected $source_instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_port + * The host and port of the on-premises instance in host:port format + * @type string $kind + * This is always `sql#onPremisesConfiguration`. + * @type string $username + * The username for connecting to on-premises instance. + * @type string $password + * The password for connecting to on-premises instance. + * @type string $ca_certificate + * PEM representation of the trusted CA's x509 certificate. + * @type string $client_certificate + * PEM representation of the replica's x509 certificate. + * @type string $client_key + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * @type string $dump_file_path + * The dump file to create the Cloud SQL replica. + * @type \Google\Cloud\Sql\V1beta4\InstanceReference $source_instance + * The reference to Cloud SQL instance if the source is Cloud SQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + * @return string + */ + public function getHostPort() + { + return $this->host_port; + } + + /** + * The host and port of the on-premises instance in host:port format + * + * Generated from protobuf field string host_port = 1; + * @param string $var + * @return $this + */ + public function setHostPort($var) + { + GPBUtil::checkString($var, True); + $this->host_port = $var; + + return $this; + } + + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#onPremisesConfiguration`. + * + * Generated from protobuf field string kind = 2; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username for connecting to on-premises instance. + * + * Generated from protobuf field string username = 3; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for connecting to on-premises instance. + * + * Generated from protobuf field string password = 4; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * PEM representation of the trusted CA's x509 certificate. + * + * Generated from protobuf field string ca_certificate = 5; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * PEM representation of the replica's x509 certificate. + * + * Generated from protobuf field string client_certificate = 6; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * PEM representation of the replica's private key. The corresponsing public + * key is encoded in the client's certificate. + * + * Generated from protobuf field string client_key = 7; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + * @return string + */ + public function getDumpFilePath() + { + return $this->dump_file_path; + } + + /** + * The dump file to create the Cloud SQL replica. + * + * Generated from protobuf field string dump_file_path = 8; + * @param string $var + * @return $this + */ + public function setDumpFilePath($var) + { + GPBUtil::checkString($var, True); + $this->dump_file_path = $var; + + return $this; + } + + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstanceReference source_instance = 15; + * @return \Google\Cloud\Sql\V1beta4\InstanceReference|null + */ + public function getSourceInstance() + { + return $this->source_instance; + } + + public function hasSourceInstance() + { + return isset($this->source_instance); + } + + public function clearSourceInstance() + { + unset($this->source_instance); + } + + /** + * The reference to Cloud SQL instance if the source is Cloud SQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstanceReference source_instance = 15; + * @param \Google\Cloud\Sql\V1beta4\InstanceReference $var + * @return $this + */ + public function setSourceInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstanceReference::class); + $this->source_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation.php new file mode 100644 index 000000000000..cd0fb1b7fb4d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation.php @@ -0,0 +1,814 @@ +google.cloud.sql.v1beta4.Operation + */ +class Operation extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Generated from protobuf field string target_link = 2; + */ + protected $target_link = ''; + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation.SqlOperationStatus status = 3; + */ + protected $status = 0; + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + */ + protected $user = ''; + /** + * The time this operation was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + */ + protected $insert_time = null; + /** + * The time this operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + */ + protected $start_time = null; + /** + * The time this operation finished in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + */ + protected $end_time = null; + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OperationErrors error = 8; + */ + protected $error = null; + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ApiWarning api_warning = 19; + */ + protected $api_warning = null; + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation.SqlOperationType operation_type = 9; + */ + protected $operation_type = 0; + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext import_context = 10; + */ + protected $import_context = null; + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext export_context = 11; + */ + protected $export_context = null; + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupContext backup_context = 17; + */ + protected $backup_context = null; + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + */ + protected $name = ''; + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + */ + protected $target_id = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + */ + protected $self_link = ''; + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + */ + protected $target_project = ''; + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + */ + protected $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operation`. + * @type string $target_link + * @type int $status + * The status of an operation. + * @type string $user + * The email address of the user who initiated this operation. + * @type \Google\Protobuf\Timestamp $insert_time + * The time this operation was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation finished in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type \Google\Cloud\Sql\V1beta4\OperationErrors $error + * If errors occurred during processing of this operation, this field will be + * populated. + * @type \Google\Cloud\Sql\V1beta4\ApiWarning $api_warning + * An Admin API warning message. + * @type int $operation_type + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * @type \Google\Cloud\Sql\V1beta4\ImportContext $import_context + * The context for import operation, if applicable. + * @type \Google\Cloud\Sql\V1beta4\ExportContext $export_context + * The context for export operation, if applicable. + * @type \Google\Cloud\Sql\V1beta4\BackupContext $backup_context + * The context for backup operation, if applicable. + * @type string $name + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * @type string $target_id + * Name of the database instance related to this operation. + * @type string $self_link + * The URI of this resource. + * @type string $target_project + * The project ID of the target instance related to this operation. + * @type \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * The context for acquire SSRS lease operation, if applicable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operation`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Generated from protobuf field string target_link = 2; + * @return string + */ + public function getTargetLink() + { + return $this->target_link; + } + + /** + * Generated from protobuf field string target_link = 2; + * @param string $var + * @return $this + */ + public function setTargetLink($var) + { + GPBUtil::checkString($var, True); + $this->target_link = $var; + + return $this; + } + + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation.SqlOperationStatus status = 3; + * @return int + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of an operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation.SqlOperationStatus status = 3; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\Operation\SqlOperationStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * The email address of the user who initiated this operation. + * + * Generated from protobuf field string user = 4; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * The time this operation was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInsertTime() + { + return $this->insert_time; + } + + public function hasInsertTime() + { + return isset($this->insert_time); + } + + public function clearInsertTime() + { + unset($this->insert_time); + } + + /** + * The time this operation was enqueued in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp insert_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInsertTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->insert_time = $var; + + return $this; + } + + /** + * The time this operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @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); + } + + /** + * The time this operation actually started in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation finished in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @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); + } + + /** + * The time this operation finished in UTC timezone in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OperationErrors error = 8; + * @return \Google\Cloud\Sql\V1beta4\OperationErrors|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * If errors occurred during processing of this operation, this field will be + * populated. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.OperationErrors error = 8; + * @param \Google\Cloud\Sql\V1beta4\OperationErrors $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\OperationErrors::class); + $this->error = $var; + + return $this; + } + + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ApiWarning api_warning = 19; + * @return \Google\Cloud\Sql\V1beta4\ApiWarning|null + */ + public function getApiWarning() + { + return $this->api_warning; + } + + public function hasApiWarning() + { + return isset($this->api_warning); + } + + public function clearApiWarning() + { + unset($this->api_warning); + } + + /** + * An Admin API warning message. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ApiWarning api_warning = 19; + * @param \Google\Cloud\Sql\V1beta4\ApiWarning $var + * @return $this + */ + public function setApiWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ApiWarning::class); + $this->api_warning = $var; + + return $this; + } + + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation.SqlOperationType operation_type = 9; + * @return int + */ + public function getOperationType() + { + return $this->operation_type; + } + + /** + * The type of the operation. Valid values are: + * * `CREATE` + * * `DELETE` + * * `UPDATE` + * * `RESTART` + * * `IMPORT` + * * `EXPORT` + * * `BACKUP_VOLUME` + * * `RESTORE_VOLUME` + * * `CREATE_USER` + * * `DELETE_USER` + * * `CREATE_DATABASE` + * * `DELETE_DATABASE` + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation.SqlOperationType operation_type = 9; + * @param int $var + * @return $this + */ + public function setOperationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\Operation\SqlOperationType::class); + $this->operation_type = $var; + + return $this; + } + + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext import_context = 10; + * @return \Google\Cloud\Sql\V1beta4\ImportContext|null + */ + public function getImportContext() + { + return $this->import_context; + } + + public function hasImportContext() + { + return isset($this->import_context); + } + + public function clearImportContext() + { + unset($this->import_context); + } + + /** + * The context for import operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext import_context = 10; + * @param \Google\Cloud\Sql\V1beta4\ImportContext $var + * @return $this + */ + public function setImportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext::class); + $this->import_context = $var; + + return $this; + } + + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext export_context = 11; + * @return \Google\Cloud\Sql\V1beta4\ExportContext|null + */ + public function getExportContext() + { + return $this->export_context; + } + + public function hasExportContext() + { + return isset($this->export_context); + } + + public function clearExportContext() + { + unset($this->export_context); + } + + /** + * The context for export operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExportContext export_context = 11; + * @param \Google\Cloud\Sql\V1beta4\ExportContext $var + * @return $this + */ + public function setExportContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ExportContext::class); + $this->export_context = $var; + + return $this; + } + + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupContext backup_context = 17; + * @return \Google\Cloud\Sql\V1beta4\BackupContext|null + */ + public function getBackupContext() + { + return $this->backup_context; + } + + public function hasBackupContext() + { + return isset($this->backup_context); + } + + public function clearBackupContext() + { + unset($this->backup_context); + } + + /** + * The context for backup operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupContext backup_context = 17; + * @param \Google\Cloud\Sql\V1beta4\BackupContext $var + * @return $this + */ + public function setBackupContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\BackupContext::class); + $this->backup_context = $var; + + return $this; + } + + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * An identifier that uniquely identifies the operation. You can use this + * identifier to retrieve the Operations resource that has information about + * the operation. + * + * Generated from protobuf field string name = 12; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + * @return string + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * Name of the database instance related to this operation. + * + * Generated from protobuf field string target_id = 13; + * @param string $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkString($var, True); + $this->target_id = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 14; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * The project ID of the target instance related to this operation. + * + * Generated from protobuf field string target_project = 15; + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @return \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @param \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationStatus.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationStatus.php new file mode 100644 index 000000000000..c54ba4540e0b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationStatus.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1beta4.Operation.SqlOperationStatus + */ +class SqlOperationStatus +{ + /** + * The state of the operation is unknown. + * + * Generated from protobuf enum SQL_OPERATION_STATUS_UNSPECIFIED = 0; + */ + const SQL_OPERATION_STATUS_UNSPECIFIED = 0; + /** + * The operation has been queued, but has not started yet. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The operation is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The operation completed. + * + * Generated from protobuf enum DONE = 3; + */ + const DONE = 3; + + private static $valueToName = [ + self::SQL_OPERATION_STATUS_UNSPECIFIED => 'SQL_OPERATION_STATUS_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::DONE => 'DONE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOperationStatus::class, \Google\Cloud\Sql\V1beta4\Operation_SqlOperationStatus::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationType.php new file mode 100644 index 000000000000..efad29723eb5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Operation/SqlOperationType.php @@ -0,0 +1,342 @@ +google.cloud.sql.v1beta4.Operation.SqlOperationType + */ +class SqlOperationType +{ + /** + * Unknown operation type. + * + * Generated from protobuf enum SQL_OPERATION_TYPE_UNSPECIFIED = 0; + */ + const SQL_OPERATION_TYPE_UNSPECIFIED = 0; + /** + * Imports data into a Cloud SQL instance. + * + * Generated from protobuf enum IMPORT = 1; + */ + const IMPORT = 1; + /** + * Exports data from a Cloud SQL instance to a Cloud Storage + * bucket. + * + * Generated from protobuf enum EXPORT = 2; + */ + const EXPORT = 2; + /** + * Creates a new Cloud SQL instance. + * + * Generated from protobuf enum CREATE = 3; + */ + const CREATE = 3; + /** + * Updates the settings of a Cloud SQL instance. + * + * Generated from protobuf enum UPDATE = 4; + */ + const UPDATE = 4; + /** + * Deletes a Cloud SQL instance. + * + * Generated from protobuf enum DELETE = 5; + */ + const DELETE = 5; + /** + * Restarts the Cloud SQL instance. + * + * Generated from protobuf enum RESTART = 6; + */ + const RESTART = 6; + /** + * Generated from protobuf enum BACKUP = 7 [deprecated = true]; + */ + const BACKUP = 7; + /** + * Generated from protobuf enum SNAPSHOT = 8 [deprecated = true]; + */ + const SNAPSHOT = 8; + /** + * Performs instance backup. + * + * Generated from protobuf enum BACKUP_VOLUME = 9; + */ + const BACKUP_VOLUME = 9; + /** + * Deletes an instance backup. + * + * Generated from protobuf enum DELETE_VOLUME = 10; + */ + const DELETE_VOLUME = 10; + /** + * Restores an instance backup. + * + * Generated from protobuf enum RESTORE_VOLUME = 11; + */ + const RESTORE_VOLUME = 11; + /** + * Injects a privileged user in mysql for MOB instances. + * + * Generated from protobuf enum INJECT_USER = 12; + */ + const INJECT_USER = 12; + /** + * Clones a Cloud SQL instance. + * + * Generated from protobuf enum CLONE = 14; + */ + const PBCLONE = 14; + /** + * Stops replication on a Cloud SQL read replica instance. + * + * Generated from protobuf enum STOP_REPLICA = 15; + */ + const STOP_REPLICA = 15; + /** + * Starts replication on a Cloud SQL read replica instance. + * + * Generated from protobuf enum START_REPLICA = 16; + */ + const START_REPLICA = 16; + /** + * Promotes a Cloud SQL replica instance. + * + * Generated from protobuf enum PROMOTE_REPLICA = 17; + */ + const PROMOTE_REPLICA = 17; + /** + * Creates a Cloud SQL replica instance. + * + * Generated from protobuf enum CREATE_REPLICA = 18; + */ + const CREATE_REPLICA = 18; + /** + * Creates a new user in a Cloud SQL instance. + * + * Generated from protobuf enum CREATE_USER = 19; + */ + const CREATE_USER = 19; + /** + * Deletes a user from a Cloud SQL instance. + * + * Generated from protobuf enum DELETE_USER = 20; + */ + const DELETE_USER = 20; + /** + * Updates an existing user in a Cloud SQL instance. + * + * Generated from protobuf enum UPDATE_USER = 21; + */ + const UPDATE_USER = 21; + /** + * Creates a database in the Cloud SQL instance. + * + * Generated from protobuf enum CREATE_DATABASE = 22; + */ + const CREATE_DATABASE = 22; + /** + * Deletes a database in the Cloud SQL instance. + * + * Generated from protobuf enum DELETE_DATABASE = 23; + */ + const DELETE_DATABASE = 23; + /** + * Updates a database in the Cloud SQL instance. + * + * Generated from protobuf enum UPDATE_DATABASE = 24; + */ + const UPDATE_DATABASE = 24; + /** + * Performs failover of an HA-enabled Cloud SQL + * failover replica. + * + * Generated from protobuf enum FAILOVER = 25; + */ + const FAILOVER = 25; + /** + * Deletes the backup taken by a backup run. + * + * Generated from protobuf enum DELETE_BACKUP = 26; + */ + const DELETE_BACKUP = 26; + /** + * Generated from protobuf enum RECREATE_REPLICA = 27; + */ + const RECREATE_REPLICA = 27; + /** + * Truncates a general or slow log table in MySQL. + * + * Generated from protobuf enum TRUNCATE_LOG = 28; + */ + const TRUNCATE_LOG = 28; + /** + * Demotes the stand-alone instance to be a Cloud SQL + * read replica for an external database server. + * + * Generated from protobuf enum DEMOTE_MASTER = 29; + */ + const DEMOTE_MASTER = 29; + /** + * Indicates that the instance is currently in maintenance. Maintenance + * typically causes the instance to be unavailable for 1-3 minutes. + * + * Generated from protobuf enum MAINTENANCE = 30; + */ + const MAINTENANCE = 30; + /** + * This field is deprecated, and will be removed in future version of API. + * + * Generated from protobuf enum ENABLE_PRIVATE_IP = 31 [deprecated = true]; + */ + const ENABLE_PRIVATE_IP = 31; + /** + * Generated from protobuf enum DEFER_MAINTENANCE = 32 [deprecated = true]; + */ + const DEFER_MAINTENANCE = 32; + /** + * Creates clone instance. + * + * Generated from protobuf enum CREATE_CLONE = 33 [deprecated = true]; + */ + const CREATE_CLONE = 33; + /** + * Reschedule maintenance to another time. + * + * Generated from protobuf enum RESCHEDULE_MAINTENANCE = 34; + */ + const RESCHEDULE_MAINTENANCE = 34; + /** + * Starts external sync of a Cloud SQL EM replica to an external primary + * instance. + * + * Generated from protobuf enum START_EXTERNAL_SYNC = 35; + */ + const START_EXTERNAL_SYNC = 35; + /** + * Recovers logs from an instance's old data disk. + * + * Generated from protobuf enum LOG_CLEANUP = 36; + */ + const LOG_CLEANUP = 36; + /** + * Performs auto-restart of an HA-enabled Cloud SQL database for auto + * recovery. + * + * Generated from protobuf enum AUTO_RESTART = 37; + */ + const AUTO_RESTART = 37; + /** + * Re-encrypts CMEK instances with latest key version. + * + * Generated from protobuf enum REENCRYPT = 38; + */ + const REENCRYPT = 38; + /** + * Switches over to replica instance from primary. + * + * Generated from protobuf enum SWITCHOVER = 39; + */ + const SWITCHOVER = 39; + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42; + */ + const ACQUIRE_SSRS_LEASE = 42; + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum RELEASE_SSRS_LEASE = 43; + */ + const RELEASE_SSRS_LEASE = 43; + /** + * Reconfigures old primary after a promote replica operation. Effect of a + * promote operation to the old primary is executed in this operation, + * asynchronously from the promote replica operation executed to the + * replica. + * + * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44; + */ + const RECONFIGURE_OLD_PRIMARY = 44; + + private static $valueToName = [ + self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED', + self::IMPORT => 'IMPORT', + self::EXPORT => 'EXPORT', + self::CREATE => 'CREATE', + self::UPDATE => 'UPDATE', + self::DELETE => 'DELETE', + self::RESTART => 'RESTART', + self::BACKUP => 'BACKUP', + self::SNAPSHOT => 'SNAPSHOT', + self::BACKUP_VOLUME => 'BACKUP_VOLUME', + self::DELETE_VOLUME => 'DELETE_VOLUME', + self::RESTORE_VOLUME => 'RESTORE_VOLUME', + self::INJECT_USER => 'INJECT_USER', + self::PBCLONE => 'CLONE', + self::STOP_REPLICA => 'STOP_REPLICA', + self::START_REPLICA => 'START_REPLICA', + self::PROMOTE_REPLICA => 'PROMOTE_REPLICA', + self::CREATE_REPLICA => 'CREATE_REPLICA', + self::CREATE_USER => 'CREATE_USER', + self::DELETE_USER => 'DELETE_USER', + self::UPDATE_USER => 'UPDATE_USER', + self::CREATE_DATABASE => 'CREATE_DATABASE', + self::DELETE_DATABASE => 'DELETE_DATABASE', + self::UPDATE_DATABASE => 'UPDATE_DATABASE', + self::FAILOVER => 'FAILOVER', + self::DELETE_BACKUP => 'DELETE_BACKUP', + self::RECREATE_REPLICA => 'RECREATE_REPLICA', + self::TRUNCATE_LOG => 'TRUNCATE_LOG', + self::DEMOTE_MASTER => 'DEMOTE_MASTER', + self::MAINTENANCE => 'MAINTENANCE', + self::ENABLE_PRIVATE_IP => 'ENABLE_PRIVATE_IP', + self::DEFER_MAINTENANCE => 'DEFER_MAINTENANCE', + self::CREATE_CLONE => 'CREATE_CLONE', + self::RESCHEDULE_MAINTENANCE => 'RESCHEDULE_MAINTENANCE', + self::START_EXTERNAL_SYNC => 'START_EXTERNAL_SYNC', + self::LOG_CLEANUP => 'LOG_CLEANUP', + self::AUTO_RESTART => 'AUTO_RESTART', + self::REENCRYPT => 'REENCRYPT', + self::SWITCHOVER => 'SWITCHOVER', + self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE', + self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE', + self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlOperationType::class, \Google\Cloud\Sql\V1beta4\Operation_SqlOperationType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationError.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationError.php new file mode 100644 index 000000000000..2497ccce4f2e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationError.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1beta4.OperationError + */ +class OperationError extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + */ + protected $code = ''; + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationError`. + * @type string $code + * Identifies the specific error that occurred. + * @type string $message + * Additional information about the error encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationError`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field string code = 2; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationErrors.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationErrors.php new file mode 100644 index 000000000000..dc8f95063c94 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationErrors.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.OperationErrors + */ +class OperationErrors extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.OperationError errors = 2; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationErrors`. + * @type array<\Google\Cloud\Sql\V1beta4\OperationError>|\Google\Protobuf\Internal\RepeatedField $errors + * The list of errors encountered while processing this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationErrors`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.OperationError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The list of errors encountered while processing this operation. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.OperationError errors = 2; + * @param array<\Google\Cloud\Sql\V1beta4\OperationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\OperationError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationsListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationsListResponse.php new file mode 100644 index 000000000000..a0a70a583899 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/OperationsListResponse.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1beta4.OperationsListResponse + */ +class OperationsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Operation items = 2; + */ + private $items; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#operationsList`. + * @type array<\Google\Cloud\Sql\V1beta4\Operation>|\Google\Protobuf\Internal\RepeatedField $items + * List of operation resources. + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#operationsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Operation items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of operation resources. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Operation items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\Operation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\Operation::class); + $this->items = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 3; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordStatus.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordStatus.php new file mode 100644 index 000000000000..3106442614b1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordStatus.php @@ -0,0 +1,111 @@ +google.cloud.sql.v1beta4.PasswordStatus + */ +class PasswordStatus extends \Google\Protobuf\Internal\Message +{ + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + */ + protected $locked = false; + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + */ + protected $password_expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $locked + * If true, user does not have login privileges. + * @type \Google\Protobuf\Timestamp $password_expiration_time + * The expiration time of the current password. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * If true, user does not have login privileges. + * + * Generated from protobuf field bool locked = 1; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPasswordExpirationTime() + { + return $this->password_expiration_time; + } + + public function hasPasswordExpirationTime() + { + return isset($this->password_expiration_time); + } + + public function clearPasswordExpirationTime() + { + unset($this->password_expiration_time); + } + + /** + * The expiration time of the current password. + * + * Generated from protobuf field .google.protobuf.Timestamp password_expiration_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPasswordExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->password_expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy.php new file mode 100644 index 000000000000..2ce3f8e23133 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy.php @@ -0,0 +1,484 @@ +google.cloud.sql.v1beta4.PasswordValidationPolicy + */ +class PasswordValidationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + */ + protected $min_length = null; + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordValidationPolicy.Complexity complexity = 2; + */ + protected $complexity = 0; + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + */ + protected $reuse_interval = null; + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + */ + protected $disallow_username_substring = null; + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + */ + protected $password_change_interval = null; + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + */ + protected $enable_password_policy = null; + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @deprecated + */ + protected $disallow_compromised_credentials = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $min_length + * Minimum number of characters allowed. + * @type int $complexity + * The complexity of the password. + * @type \Google\Protobuf\Int32Value $reuse_interval + * Number of previous passwords that cannot be reused. + * @type \Google\Protobuf\BoolValue $disallow_username_substring + * Disallow username as a part of the password. + * @type \Google\Protobuf\Duration $password_change_interval + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * @type \Google\Protobuf\BoolValue $enable_password_policy + * Whether the password policy is enabled or not. + * @type \Google\Protobuf\BoolValue $disallow_compromised_credentials + * This field is deprecated and will be removed in a future version of the + * API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @return \Google\Protobuf\Int32Value|null + */ + public function getMinLength() + { + return $this->min_length; + } + + public function hasMinLength() + { + return isset($this->min_length); + } + + public function clearMinLength() + { + unset($this->min_length); + } + + /** + * Returns the unboxed value from getMinLength() + + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @return int|null + */ + public function getMinLengthUnwrapped() + { + return $this->readWrapperValue("min_length"); + } + + /** + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setMinLength($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->min_length = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Minimum number of characters allowed. + * + * Generated from protobuf field .google.protobuf.Int32Value min_length = 1; + * @param int|null $var + * @return $this + */ + public function setMinLengthUnwrapped($var) + { + $this->writeWrapperValue("min_length", $var); + return $this;} + + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordValidationPolicy.Complexity complexity = 2; + * @return int + */ + public function getComplexity() + { + return $this->complexity; + } + + /** + * The complexity of the password. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordValidationPolicy.Complexity complexity = 2; + * @param int $var + * @return $this + */ + public function setComplexity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\PasswordValidationPolicy\Complexity::class); + $this->complexity = $var; + + return $this; + } + + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @return \Google\Protobuf\Int32Value|null + */ + public function getReuseInterval() + { + return $this->reuse_interval; + } + + public function hasReuseInterval() + { + return isset($this->reuse_interval); + } + + public function clearReuseInterval() + { + unset($this->reuse_interval); + } + + /** + * Returns the unboxed value from getReuseInterval() + + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @return int|null + */ + public function getReuseIntervalUnwrapped() + { + return $this->readWrapperValue("reuse_interval"); + } + + /** + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setReuseInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->reuse_interval = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Number of previous passwords that cannot be reused. + * + * Generated from protobuf field .google.protobuf.Int32Value reuse_interval = 3; + * @param int|null $var + * @return $this + */ + public function setReuseIntervalUnwrapped($var) + { + $this->writeWrapperValue("reuse_interval", $var); + return $this;} + + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDisallowUsernameSubstring() + { + return $this->disallow_username_substring; + } + + public function hasDisallowUsernameSubstring() + { + return isset($this->disallow_username_substring); + } + + public function clearDisallowUsernameSubstring() + { + unset($this->disallow_username_substring); + } + + /** + * Returns the unboxed value from getDisallowUsernameSubstring() + + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @return bool|null + */ + public function getDisallowUsernameSubstringUnwrapped() + { + return $this->readWrapperValue("disallow_username_substring"); + } + + /** + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDisallowUsernameSubstring($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disallow_username_substring = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Disallow username as a part of the password. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_username_substring = 4; + * @param bool|null $var + * @return $this + */ + public function setDisallowUsernameSubstringUnwrapped($var) + { + $this->writeWrapperValue("disallow_username_substring", $var); + return $this;} + + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getPasswordChangeInterval() + { + return $this->password_change_interval; + } + + public function hasPasswordChangeInterval() + { + return isset($this->password_change_interval); + } + + public function clearPasswordChangeInterval() + { + unset($this->password_change_interval); + } + + /** + * Minimum interval after which the password can be changed. This flag is only + * supported for PostgreSQL. + * + * Generated from protobuf field .google.protobuf.Duration password_change_interval = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPasswordChangeInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->password_change_interval = $var; + + return $this; + } + + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnablePasswordPolicy() + { + return $this->enable_password_policy; + } + + public function hasEnablePasswordPolicy() + { + return isset($this->enable_password_policy); + } + + public function clearEnablePasswordPolicy() + { + unset($this->enable_password_policy); + } + + /** + * Returns the unboxed value from getEnablePasswordPolicy() + + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @return bool|null + */ + public function getEnablePasswordPolicyUnwrapped() + { + return $this->readWrapperValue("enable_password_policy"); + } + + /** + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnablePasswordPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_password_policy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether the password policy is enabled or not. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_password_policy = 6; + * @param bool|null $var + * @return $this + */ + public function setEnablePasswordPolicyUnwrapped($var) + { + $this->writeWrapperValue("enable_password_policy", $var); + return $this;} + + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return $this->disallow_compromised_credentials; + } + + public function hasDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return isset($this->disallow_compromised_credentials); + } + + public function clearDisallowCompromisedCredentials() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + unset($this->disallow_compromised_credentials); + } + + /** + * Returns the unboxed value from getDisallowCompromisedCredentials() + + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @return bool|null + */ + public function getDisallowCompromisedCredentialsUnwrapped() + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("disallow_compromised_credentials"); + } + + /** + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setDisallowCompromisedCredentials($var) + { + @trigger_error('disallow_compromised_credentials is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->disallow_compromised_credentials = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * This field is deprecated and will be removed in a future version of the + * API. + * + * Generated from protobuf field .google.protobuf.BoolValue disallow_compromised_credentials = 7 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setDisallowCompromisedCredentialsUnwrapped($var) + { + $this->writeWrapperValue("disallow_compromised_credentials", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy/Complexity.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy/Complexity.php new file mode 100644 index 000000000000..b3de3efd19fc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PasswordValidationPolicy/Complexity.php @@ -0,0 +1,58 @@ +google.cloud.sql.v1beta4.PasswordValidationPolicy.Complexity + */ +class Complexity +{ + /** + * Complexity check is not specified. + * + * Generated from protobuf enum COMPLEXITY_UNSPECIFIED = 0; + */ + const COMPLEXITY_UNSPECIFIED = 0; + /** + * A combination of lowercase, uppercase, numeric, and non-alphanumeric + * characters. + * + * Generated from protobuf enum COMPLEXITY_DEFAULT = 1; + */ + const COMPLEXITY_DEFAULT = 1; + + private static $valueToName = [ + self::COMPLEXITY_UNSPECIFIED => 'COMPLEXITY_UNSPECIFIED', + self::COMPLEXITY_DEFAULT => 'COMPLEXITY_DEFAULT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Complexity::class, \Google\Cloud\Sql\V1beta4\PasswordValidationPolicy_Complexity::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PerformDiskShrinkContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PerformDiskShrinkContext.php new file mode 100644 index 000000000000..0e6602fe8c52 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PerformDiskShrinkContext.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1beta4.PerformDiskShrinkContext + */ +class PerformDiskShrinkContext extends \Google\Protobuf\Internal\Message +{ + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + */ + protected $target_size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $target_size_gb + * The target disk shrink size in GigaBytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + * @return int|string + */ + public function getTargetSizeGb() + { + return $this->target_size_gb; + } + + /** + * The target disk shrink size in GigaBytes. + * + * Generated from protobuf field int64 target_size_gb = 1; + * @param int|string $var + * @return $this + */ + public function setTargetSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->target_size_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PscConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PscConfig.php new file mode 100644 index 000000000000..2ec34f922f35 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/PscConfig.php @@ -0,0 +1,127 @@ +google.cloud.sql.v1beta4.PscConfig + */ +class PscConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + */ + protected $psc_enabled = null; + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_consumer_projects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $psc_enabled + * Whether PSC connectivity is enabled for this instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_consumer_projects + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + * @return bool + */ + public function getPscEnabled() + { + return isset($this->psc_enabled) ? $this->psc_enabled : false; + } + + public function hasPscEnabled() + { + return isset($this->psc_enabled); + } + + public function clearPscEnabled() + { + unset($this->psc_enabled); + } + + /** + * Whether PSC connectivity is enabled for this instance. + * + * Generated from protobuf field optional bool psc_enabled = 1; + * @param bool $var + * @return $this + */ + public function setPscEnabled($var) + { + GPBUtil::checkBool($var); + $this->psc_enabled = $var; + + return $this; + } + + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedConsumerProjects() + { + return $this->allowed_consumer_projects; + } + + /** + * Optional. The list of consumer projects that are allow-listed for PSC + * connections to this instance. This instance can be connected to with PSC + * from any network in these projects. + * Each consumer project in this list may be represented by a project number + * (numeric) or by a project id (alphanumeric). + * + * Generated from protobuf field repeated string allowed_consumer_projects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedConsumerProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_consumer_projects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicaConfiguration.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicaConfiguration.php new file mode 100644 index 000000000000..8a38bfcfcbee --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicaConfiguration.php @@ -0,0 +1,309 @@ +google.cloud.sql.v1beta4.ReplicaConfiguration + */ +class ReplicaConfiguration extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlReplicaConfiguration mysql_replica_configuration = 2; + */ + protected $mysql_replica_configuration = null; + /** + * Specifies if the replica is the failover target. If the field is set to + * `true` the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + */ + protected $failover_target = null; + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cascadable_replica = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#replicaConfiguration`. + * @type \Google\Cloud\Sql\V1beta4\MySqlReplicaConfiguration $mysql_replica_configuration + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * @type \Google\Protobuf\BoolValue $failover_target + * Specifies if the replica is the failover target. If the field is set to + * `true` the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * @type \Google\Protobuf\BoolValue $cascadable_replica + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#replicaConfiguration`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlReplicaConfiguration mysql_replica_configuration = 2; + * @return \Google\Cloud\Sql\V1beta4\MySqlReplicaConfiguration|null + */ + public function getMysqlReplicaConfiguration() + { + return $this->mysql_replica_configuration; + } + + public function hasMysqlReplicaConfiguration() + { + return isset($this->mysql_replica_configuration); + } + + public function clearMysqlReplicaConfiguration() + { + unset($this->mysql_replica_configuration); + } + + /** + * MySQL specific configuration when replicating from a MySQL on-premises + * primary instance. Replication configuration information such as the + * username, password, certificates, and keys are not stored in the instance + * metadata. The configuration information is used only to set up the + * replication connection and is stored by MySQL in a file named + * `master.info` in the data directory. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlReplicaConfiguration mysql_replica_configuration = 2; + * @param \Google\Cloud\Sql\V1beta4\MySqlReplicaConfiguration $var + * @return $this + */ + public function setMysqlReplicaConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\MySqlReplicaConfiguration::class); + $this->mysql_replica_configuration = $var; + + return $this; + } + + /** + * Specifies if the replica is the failover target. If the field is set to + * `true` the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @return \Google\Protobuf\BoolValue|null + */ + public function getFailoverTarget() + { + return $this->failover_target; + } + + public function hasFailoverTarget() + { + return isset($this->failover_target); + } + + public function clearFailoverTarget() + { + unset($this->failover_target); + } + + /** + * Returns the unboxed value from getFailoverTarget() + + * Specifies if the replica is the failover target. If the field is set to + * `true` the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @return bool|null + */ + public function getFailoverTargetUnwrapped() + { + return $this->readWrapperValue("failover_target"); + } + + /** + * Specifies if the replica is the failover target. If the field is set to + * `true` the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setFailoverTarget($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->failover_target = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Specifies if the replica is the failover target. If the field is set to + * `true` the replica will be designated as a failover replica. In case the + * primary instance fails, the replica instance will be promoted as the new + * primary instance. Only one replica can be specified as failover target, and + * the replica has to be in different zone with the primary instance. + * + * Generated from protobuf field .google.protobuf.BoolValue failover_target = 3; + * @param bool|null $var + * @return $this + */ + public function setFailoverTargetUnwrapped($var) + { + $this->writeWrapperValue("failover_target", $var); + return $this;} + + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getCascadableReplica() + { + return $this->cascadable_replica; + } + + public function hasCascadableReplica() + { + return isset($this->cascadable_replica); + } + + public function clearCascadableReplica() + { + unset($this->cascadable_replica); + } + + /** + * Returns the unboxed value from getCascadableReplica() + + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getCascadableReplicaUnwrapped() + { + return $this->readWrapperValue("cascadable_replica"); + } + + /** + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setCascadableReplica($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->cascadable_replica = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Specifies if a SQL Server replica is a cascadable replica. A + * cascadable replica is a SQL Server cross region replica that supports + * replica(s) under it. + * + * Generated from protobuf field .google.protobuf.BoolValue cascadable_replica = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setCascadableReplicaUnwrapped($var) + { + $this->writeWrapperValue("cascadable_replica", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicationCluster.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicationCluster.php new file mode 100644 index 000000000000..3cf5afb24c0b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/ReplicationCluster.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1beta4.ReplicationCluster + */ +class ReplicationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $failover_dr_replica_name = null; + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dr_replica = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $failover_dr_replica_name + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * @type bool $dr_replica + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFailoverDrReplicaName() + { + return isset($this->failover_dr_replica_name) ? $this->failover_dr_replica_name : ''; + } + + public function hasFailoverDrReplicaName() + { + return isset($this->failover_dr_replica_name); + } + + public function clearFailoverDrReplicaName() + { + unset($this->failover_dr_replica_name); + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFailoverDrReplicaName($var) + { + GPBUtil::checkString($var, True); + $this->failover_dr_replica_name = $var; + + return $this; + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDrReplica() + { + return isset($this->dr_replica) ? $this->dr_replica : false; + } + + public function hasDrReplica() + { + return isset($this->dr_replica); + } + + public function clearDrReplica() + { + unset($this->dr_replica); + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDrReplica($var) + { + GPBUtil::checkBool($var); + $this->dr_replica = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RestoreBackupContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RestoreBackupContext.php new file mode 100644 index 000000000000..0ebdaa1e8f5b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RestoreBackupContext.php @@ -0,0 +1,170 @@ +google.cloud.sql.v1beta4.RestoreBackupContext + */ +class RestoreBackupContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + */ + protected $backup_run_id = 0; + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + */ + protected $instance_id = ''; + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#restoreBackupContext`. + * @type int|string $backup_run_id + * The ID of the backup run to restore from. + * @type string $instance_id + * The ID of the instance that the backup was taken from. + * @type string $project + * The full project ID of the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#restoreBackupContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + * @return int|string + */ + public function getBackupRunId() + { + return $this->backup_run_id; + } + + /** + * The ID of the backup run to restore from. + * + * Generated from protobuf field int64 backup_run_id = 2; + * @param int|string $var + * @return $this + */ + public function setBackupRunId($var) + { + GPBUtil::checkInt64($var); + $this->backup_run_id = $var; + + return $this; + } + + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * The ID of the instance that the backup was taken from. + * + * Generated from protobuf field string instance_id = 3; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The full project ID of the source instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RotateServerCaContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RotateServerCaContext.php new file mode 100644 index 000000000000..0ec28e9c02bf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/RotateServerCaContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1beta4.RotateServerCaContext + */ +class RotateServerCaContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + */ + protected $next_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#rotateServerCaContext`. + * @type string $next_version + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#rotateServerCaContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + * @return string + */ + public function getNextVersion() + { + return $this->next_version; + } + + /** + * The fingerprint of the next version to be rotated to. If left unspecified, + * will be rotated to the most recently added server CA version. + * + * Generated from protobuf field string next_version = 2; + * @param string $var + * @return $this + */ + public function setNextVersion($var) + { + GPBUtil::checkString($var, True); + $this->next_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings.php new file mode 100644 index 000000000000..386609a94f48 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings.php @@ -0,0 +1,1773 @@ +google.cloud.sql.v1beta4.Settings + */ +class Settings extends \Google\Protobuf\Internal\Message +{ + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + */ + protected $settings_version = null; + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @deprecated + */ + private $authorized_gae_applications; + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + */ + protected $tier = ''; + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + */ + protected $kind = ''; + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + */ + private $user_labels; + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlAvailabilityType availability_type = 6; + */ + protected $availability_type = 0; + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlPricingPlan pricing_plan = 7; + */ + protected $pricing_plan = 0; + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlReplicationType replication_type = 8 [deprecated = true]; + * @deprecated + */ + protected $replication_type = 0; + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + */ + protected $storage_auto_resize_limit = null; + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.SqlActivationPolicy activation_policy = 10; + */ + protected $activation_policy = 0; + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration ip_configuration = 11; + */ + protected $ip_configuration = null; + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + */ + protected $storage_auto_resize = null; + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.LocationPreference location_preference = 13; + */ + protected $location_preference = null; + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DatabaseFlags database_flags = 14; + */ + private $database_flags; + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDataDiskType data_disk_type = 15; + */ + protected $data_disk_type = 0; + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MaintenanceWindow maintenance_window = 16; + */ + protected $maintenance_window = null; + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupConfiguration backup_configuration = 17; + */ + protected $backup_configuration = null; + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + */ + protected $database_replication_enabled = null; + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @deprecated + */ + protected $crash_safe_replication_enabled = null; + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + */ + protected $data_disk_size_gb = null; + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlActiveDirectoryConfig active_directory_config = 22; + */ + protected $active_directory_config = null; + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + */ + protected $collation = ''; + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DenyMaintenancePeriod deny_maintenance_periods = 24; + */ + private $deny_maintenance_periods; + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InsightsConfig insights_config = 25; + */ + protected $insights_config = null; + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordValidationPolicy password_validation_policy = 27; + */ + protected $password_validation_policy = null; + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerAuditConfig sql_server_audit_config = 29; + */ + protected $sql_server_audit_config = null; + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $edition = 0; + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors) + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.ConnectorEnforcement connector_enforcement = 32; + */ + protected $connector_enforcement = 0; + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + */ + protected $deletion_protection_enabled = null; + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + */ + protected $time_zone = ''; + /** + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AdvancedMachineFeatures advanced_machine_features = 35; + */ + protected $advanced_machine_features = null; + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DataCacheConfig data_cache_config = 37; + */ + protected $data_cache_config = null; + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_google_ml_integration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $settings_version + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * @type array|\Google\Protobuf\Internal\RepeatedField $authorized_gae_applications + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * @type string $tier + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * @type string $kind + * This is always `sql#settings`. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * @type int $availability_type + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * @type int $pricing_plan + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * @type int $replication_type + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * @type \Google\Protobuf\Int64Value $storage_auto_resize_limit + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * @type int $activation_policy + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * @type \Google\Cloud\Sql\V1beta4\IpConfiguration $ip_configuration + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * @type \Google\Protobuf\BoolValue $storage_auto_resize + * Configuration to increase storage size automatically. The default value is + * true. + * @type \Google\Cloud\Sql\V1beta4\LocationPreference $location_preference + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * @type array<\Google\Cloud\Sql\V1beta4\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $database_flags + * The database flags passed to the instance at startup. + * @type int $data_disk_type + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * @type \Google\Cloud\Sql\V1beta4\MaintenanceWindow $maintenance_window + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * @type \Google\Cloud\Sql\V1beta4\BackupConfiguration $backup_configuration + * The daily backup configuration for the instance. + * @type \Google\Protobuf\BoolValue $database_replication_enabled + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * @type \Google\Protobuf\BoolValue $crash_safe_replication_enabled + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * @type \Google\Protobuf\Int64Value $data_disk_size_gb + * The size of data disk, in GB. The data disk size minimum is 10GB. + * @type \Google\Cloud\Sql\V1beta4\SqlActiveDirectoryConfig $active_directory_config + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * @type string $collation + * The name of server Instance collation. + * @type array<\Google\Cloud\Sql\V1beta4\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $deny_maintenance_periods + * Deny maintenance periods + * @type \Google\Cloud\Sql\V1beta4\InsightsConfig $insights_config + * Insights configuration, for now relevant only for Postgres. + * @type \Google\Cloud\Sql\V1beta4\PasswordValidationPolicy $password_validation_policy + * The local user password validation policy of the instance. + * @type \Google\Cloud\Sql\V1beta4\SqlServerAuditConfig $sql_server_audit_config + * SQL Server specific audit configuration. + * @type int $edition + * Optional. The edition of the instance. + * @type int $connector_enforcement + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors) + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * @type \Google\Protobuf\BoolValue $deletion_protection_enabled + * Configuration to protect against accidental instance deletion. + * @type string $time_zone + * Server timezone, relevant only for Cloud SQL for SQL Server. + * @type \Google\Cloud\Sql\V1beta4\AdvancedMachineFeatures $advanced_machine_features + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * @type \Google\Cloud\Sql\V1beta4\DataCacheConfig $data_cache_config + * Configuration for data cache. + * @type \Google\Protobuf\BoolValue $enable_google_ml_integration + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @return \Google\Protobuf\Int64Value|null + */ + public function getSettingsVersion() + { + return $this->settings_version; + } + + public function hasSettingsVersion() + { + return isset($this->settings_version); + } + + public function clearSettingsVersion() + { + unset($this->settings_version); + } + + /** + * Returns the unboxed value from getSettingsVersion() + + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @return int|string|null + */ + public function getSettingsVersionUnwrapped() + { + return $this->readWrapperValue("settings_version"); + } + + /** + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setSettingsVersion($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->settings_version = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The version of instance settings. This is a required field for update + * method to make sure concurrent updates are handled properly. During update, + * use the most recent settingsVersion value for this instance and do not try + * to update this value. + * + * Generated from protobuf field .google.protobuf.Int64Value settings_version = 1; + * @param int|string|null $var + * @return $this + */ + public function setSettingsVersionUnwrapped($var) + { + $this->writeWrapperValue("settings_version", $var); + return $this;} + + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getAuthorizedGaeApplications() + { + @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); + return $this->authorized_gae_applications; + } + + /** + * The App Engine app IDs that can access this instance. + * (Deprecated) Applied to First Generation instances only. + * + * Generated from protobuf field repeated string authorized_gae_applications = 2 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setAuthorizedGaeApplications($var) + { + @trigger_error('authorized_gae_applications is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->authorized_gae_applications = $arr; + + return $this; + } + + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + * @return string + */ + public function getTier() + { + return $this->tier; + } + + /** + * The tier (or machine type) for this instance, for example + * `db-custom-1-3840`. WARNING: Changing this restarts the instance. + * + * Generated from protobuf field string tier = 3; + * @param string $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkString($var, True); + $this->tier = $var; + + return $this; + } + + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#settings`. + * + * Generated from protobuf field string kind = 4; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * User-provided labels, represented as a dictionary where each label is a + * single key value pair. + * + * Generated from protobuf field map user_labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlAvailabilityType availability_type = 6; + * @return int + */ + public function getAvailabilityType() + { + return $this->availability_type; + } + + /** + * Availability type. Potential values: + * * `ZONAL`: The instance serves data from only one zone. Outages in that + * zone affect data accessibility. + * * `REGIONAL`: The instance can serve data from more than one zone in a + * region (it is highly available)./ + * For more information, see [Overview of the High Availability + * Configuration](https://cloud.google.com/sql/docs/mysql/high-availability). + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlAvailabilityType availability_type = 6; + * @param int $var + * @return $this + */ + public function setAvailabilityType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlAvailabilityType::class); + $this->availability_type = $var; + + return $this; + } + + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlPricingPlan pricing_plan = 7; + * @return int + */ + public function getPricingPlan() + { + return $this->pricing_plan; + } + + /** + * The pricing plan for this instance. This can be either `PER_USE` or + * `PACKAGE`. Only `PER_USE` is supported for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlPricingPlan pricing_plan = 7; + * @param int $var + * @return $this + */ + public function setPricingPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlPricingPlan::class); + $this->pricing_plan = $var; + + return $this; + } + + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlReplicationType replication_type = 8 [deprecated = true]; + * @return int + * @deprecated + */ + public function getReplicationType() + { + @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); + return $this->replication_type; + } + + /** + * The type of replication this instance uses. This can be either + * `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only + * applicable to First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlReplicationType replication_type = 8 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setReplicationType($var) + { + @trigger_error('replication_type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlReplicationType::class); + $this->replication_type = $var; + + return $this; + } + + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @return \Google\Protobuf\Int64Value|null + */ + public function getStorageAutoResizeLimit() + { + return $this->storage_auto_resize_limit; + } + + public function hasStorageAutoResizeLimit() + { + return isset($this->storage_auto_resize_limit); + } + + public function clearStorageAutoResizeLimit() + { + unset($this->storage_auto_resize_limit); + } + + /** + * Returns the unboxed value from getStorageAutoResizeLimit() + + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @return int|string|null + */ + public function getStorageAutoResizeLimitUnwrapped() + { + return $this->readWrapperValue("storage_auto_resize_limit"); + } + + /** + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setStorageAutoResizeLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->storage_auto_resize_limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The maximum size to which storage capacity can be automatically increased. + * The default value is 0, which specifies that there is no limit. + * + * Generated from protobuf field .google.protobuf.Int64Value storage_auto_resize_limit = 9; + * @param int|string|null $var + * @return $this + */ + public function setStorageAutoResizeLimitUnwrapped($var) + { + $this->writeWrapperValue("storage_auto_resize_limit", $var); + return $this;} + + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.SqlActivationPolicy activation_policy = 10; + * @return int + */ + public function getActivationPolicy() + { + return $this->activation_policy; + } + + /** + * The activation policy specifies when the instance is activated; it is + * applicable only when the instance state is RUNNABLE. Valid values: + * * `ALWAYS`: The instance is on, and remains so even in the absence of + * connection requests. + * * `NEVER`: The instance is off; it is not activated, even if a + * connection request arrives. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.SqlActivationPolicy activation_policy = 10; + * @param int $var + * @return $this + */ + public function setActivationPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\Settings\SqlActivationPolicy::class); + $this->activation_policy = $var; + + return $this; + } + + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration ip_configuration = 11; + * @return \Google\Cloud\Sql\V1beta4\IpConfiguration|null + */ + public function getIpConfiguration() + { + return $this->ip_configuration; + } + + public function hasIpConfiguration() + { + return isset($this->ip_configuration); + } + + public function clearIpConfiguration() + { + unset($this->ip_configuration); + } + + /** + * The settings for IP Management. This allows to enable or disable the + * instance IP and manage which external networks can connect to the instance. + * The IPv4 address cannot be disabled for Second Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration ip_configuration = 11; + * @param \Google\Cloud\Sql\V1beta4\IpConfiguration $var + * @return $this + */ + public function setIpConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\IpConfiguration::class); + $this->ip_configuration = $var; + + return $this; + } + + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @return \Google\Protobuf\BoolValue|null + */ + public function getStorageAutoResize() + { + return $this->storage_auto_resize; + } + + public function hasStorageAutoResize() + { + return isset($this->storage_auto_resize); + } + + public function clearStorageAutoResize() + { + unset($this->storage_auto_resize); + } + + /** + * Returns the unboxed value from getStorageAutoResize() + + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @return bool|null + */ + public function getStorageAutoResizeUnwrapped() + { + return $this->readWrapperValue("storage_auto_resize"); + } + + /** + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setStorageAutoResize($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->storage_auto_resize = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to increase storage size automatically. The default value is + * true. + * + * Generated from protobuf field .google.protobuf.BoolValue storage_auto_resize = 12; + * @param bool|null $var + * @return $this + */ + public function setStorageAutoResizeUnwrapped($var) + { + $this->writeWrapperValue("storage_auto_resize", $var); + return $this;} + + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.LocationPreference location_preference = 13; + * @return \Google\Cloud\Sql\V1beta4\LocationPreference|null + */ + public function getLocationPreference() + { + return $this->location_preference; + } + + public function hasLocationPreference() + { + return isset($this->location_preference); + } + + public function clearLocationPreference() + { + unset($this->location_preference); + } + + /** + * The location preference settings. This allows the instance to be located as + * near as possible to either an App Engine app or Compute Engine zone for + * better performance. App Engine co-location was only applicable to First + * Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.LocationPreference location_preference = 13; + * @param \Google\Cloud\Sql\V1beta4\LocationPreference $var + * @return $this + */ + public function setLocationPreference($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\LocationPreference::class); + $this->location_preference = $var; + + return $this; + } + + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DatabaseFlags database_flags = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDatabaseFlags() + { + return $this->database_flags; + } + + /** + * The database flags passed to the instance at startup. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DatabaseFlags database_flags = 14; + * @param array<\Google\Cloud\Sql\V1beta4\DatabaseFlags>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDatabaseFlags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\DatabaseFlags::class); + $this->database_flags = $arr; + + return $this; + } + + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDataDiskType data_disk_type = 15; + * @return int + */ + public function getDataDiskType() + { + return $this->data_disk_type; + } + + /** + * The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for + * First Generation instances. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlDataDiskType data_disk_type = 15; + * @param int $var + * @return $this + */ + public function setDataDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlDataDiskType::class); + $this->data_disk_type = $var; + + return $this; + } + + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MaintenanceWindow maintenance_window = 16; + * @return \Google\Cloud\Sql\V1beta4\MaintenanceWindow|null + */ + public function getMaintenanceWindow() + { + return $this->maintenance_window; + } + + public function hasMaintenanceWindow() + { + return isset($this->maintenance_window); + } + + public function clearMaintenanceWindow() + { + unset($this->maintenance_window); + } + + /** + * The maintenance window for this instance. This specifies when the instance + * can be restarted for maintenance purposes. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MaintenanceWindow maintenance_window = 16; + * @param \Google\Cloud\Sql\V1beta4\MaintenanceWindow $var + * @return $this + */ + public function setMaintenanceWindow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\MaintenanceWindow::class); + $this->maintenance_window = $var; + + return $this; + } + + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupConfiguration backup_configuration = 17; + * @return \Google\Cloud\Sql\V1beta4\BackupConfiguration|null + */ + public function getBackupConfiguration() + { + return $this->backup_configuration; + } + + public function hasBackupConfiguration() + { + return isset($this->backup_configuration); + } + + public function clearBackupConfiguration() + { + unset($this->backup_configuration); + } + + /** + * The daily backup configuration for the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupConfiguration backup_configuration = 17; + * @param \Google\Cloud\Sql\V1beta4\BackupConfiguration $var + * @return $this + */ + public function setBackupConfiguration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\BackupConfiguration::class); + $this->backup_configuration = $var; + + return $this; + } + + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDatabaseReplicationEnabled() + { + return $this->database_replication_enabled; + } + + public function hasDatabaseReplicationEnabled() + { + return isset($this->database_replication_enabled); + } + + public function clearDatabaseReplicationEnabled() + { + unset($this->database_replication_enabled); + } + + /** + * Returns the unboxed value from getDatabaseReplicationEnabled() + + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @return bool|null + */ + public function getDatabaseReplicationEnabledUnwrapped() + { + return $this->readWrapperValue("database_replication_enabled"); + } + + /** + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDatabaseReplicationEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->database_replication_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration specific to read replica instances. Indicates whether + * replication is enabled or not. WARNING: Changing this restarts the + * instance. + * + * Generated from protobuf field .google.protobuf.BoolValue database_replication_enabled = 18; + * @param bool|null $var + * @return $this + */ + public function setDatabaseReplicationEnabledUnwrapped($var) + { + $this->writeWrapperValue("database_replication_enabled", $var); + return $this;} + + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @return \Google\Protobuf\BoolValue|null + * @deprecated + */ + public function getCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return $this->crash_safe_replication_enabled; + } + + public function hasCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return isset($this->crash_safe_replication_enabled); + } + + public function clearCrashSafeReplicationEnabled() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + unset($this->crash_safe_replication_enabled); + } + + /** + * Returns the unboxed value from getCrashSafeReplicationEnabled() + + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @return bool|null + */ + public function getCrashSafeReplicationEnabledUnwrapped() + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("crash_safe_replication_enabled"); + } + + /** + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + * @deprecated + */ + public function setCrashSafeReplicationEnabled($var) + { + @trigger_error('crash_safe_replication_enabled is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->crash_safe_replication_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration specific to read replica instances. Indicates whether + * database flags for crash-safe replication are enabled. This property was + * only applicable to First Generation instances. + * + * Generated from protobuf field .google.protobuf.BoolValue crash_safe_replication_enabled = 19 [deprecated = true]; + * @param bool|null $var + * @return $this + */ + public function setCrashSafeReplicationEnabledUnwrapped($var) + { + $this->writeWrapperValue("crash_safe_replication_enabled", $var); + return $this;} + + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @return \Google\Protobuf\Int64Value|null + */ + public function getDataDiskSizeGb() + { + return $this->data_disk_size_gb; + } + + public function hasDataDiskSizeGb() + { + return isset($this->data_disk_size_gb); + } + + public function clearDataDiskSizeGb() + { + unset($this->data_disk_size_gb); + } + + /** + * Returns the unboxed value from getDataDiskSizeGb() + + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @return int|string|null + */ + public function getDataDiskSizeGbUnwrapped() + { + return $this->readWrapperValue("data_disk_size_gb"); + } + + /** + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setDataDiskSizeGb($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->data_disk_size_gb = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The size of data disk, in GB. The data disk size minimum is 10GB. + * + * Generated from protobuf field .google.protobuf.Int64Value data_disk_size_gb = 20; + * @param int|string|null $var + * @return $this + */ + public function setDataDiskSizeGbUnwrapped($var) + { + $this->writeWrapperValue("data_disk_size_gb", $var); + return $this;} + + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlActiveDirectoryConfig active_directory_config = 22; + * @return \Google\Cloud\Sql\V1beta4\SqlActiveDirectoryConfig|null + */ + public function getActiveDirectoryConfig() + { + return $this->active_directory_config; + } + + public function hasActiveDirectoryConfig() + { + return isset($this->active_directory_config); + } + + public function clearActiveDirectoryConfig() + { + unset($this->active_directory_config); + } + + /** + * Active Directory configuration, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlActiveDirectoryConfig active_directory_config = 22; + * @param \Google\Cloud\Sql\V1beta4\SqlActiveDirectoryConfig $var + * @return $this + */ + public function setActiveDirectoryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SqlActiveDirectoryConfig::class); + $this->active_directory_config = $var; + + return $this; + } + + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * The name of server Instance collation. + * + * Generated from protobuf field string collation = 23; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DenyMaintenancePeriod deny_maintenance_periods = 24; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDenyMaintenancePeriods() + { + return $this->deny_maintenance_periods; + } + + /** + * Deny maintenance periods + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.DenyMaintenancePeriod deny_maintenance_periods = 24; + * @param array<\Google\Cloud\Sql\V1beta4\DenyMaintenancePeriod>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDenyMaintenancePeriods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\DenyMaintenancePeriod::class); + $this->deny_maintenance_periods = $arr; + + return $this; + } + + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InsightsConfig insights_config = 25; + * @return \Google\Cloud\Sql\V1beta4\InsightsConfig|null + */ + public function getInsightsConfig() + { + return $this->insights_config; + } + + public function hasInsightsConfig() + { + return isset($this->insights_config); + } + + public function clearInsightsConfig() + { + unset($this->insights_config); + } + + /** + * Insights configuration, for now relevant only for Postgres. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InsightsConfig insights_config = 25; + * @param \Google\Cloud\Sql\V1beta4\InsightsConfig $var + * @return $this + */ + public function setInsightsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InsightsConfig::class); + $this->insights_config = $var; + + return $this; + } + + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordValidationPolicy password_validation_policy = 27; + * @return \Google\Cloud\Sql\V1beta4\PasswordValidationPolicy|null + */ + public function getPasswordValidationPolicy() + { + return $this->password_validation_policy; + } + + public function hasPasswordValidationPolicy() + { + return isset($this->password_validation_policy); + } + + public function clearPasswordValidationPolicy() + { + unset($this->password_validation_policy); + } + + /** + * The local user password validation policy of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordValidationPolicy password_validation_policy = 27; + * @param \Google\Cloud\Sql\V1beta4\PasswordValidationPolicy $var + * @return $this + */ + public function setPasswordValidationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\PasswordValidationPolicy::class); + $this->password_validation_policy = $var; + + return $this; + } + + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerAuditConfig sql_server_audit_config = 29; + * @return \Google\Cloud\Sql\V1beta4\SqlServerAuditConfig|null + */ + public function getSqlServerAuditConfig() + { + return $this->sql_server_audit_config; + } + + public function hasSqlServerAuditConfig() + { + return isset($this->sql_server_audit_config); + } + + public function clearSqlServerAuditConfig() + { + unset($this->sql_server_audit_config); + } + + /** + * SQL Server specific audit configuration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerAuditConfig sql_server_audit_config = 29; + * @param \Google\Cloud\Sql\V1beta4\SqlServerAuditConfig $var + * @return $this + */ + public function setSqlServerAuditConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SqlServerAuditConfig::class); + $this->sql_server_audit_config = $var; + + return $this; + } + + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEdition() + { + return $this->edition; + } + + /** + * Optional. The edition of the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.Edition edition = 38 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\Settings\Edition::class); + $this->edition = $var; + + return $this; + } + + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors) + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.ConnectorEnforcement connector_enforcement = 32; + * @return int + */ + public function getConnectorEnforcement() + { + return $this->connector_enforcement; + } + + /** + * Specifies if connections must use Cloud SQL connectors. + * Option values include the following: `NOT_REQUIRED` (Cloud SQL instances + * can be connected without Cloud SQL + * Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL + * Connectors) + * Note that using REQUIRED disables all existing authorized networks. If + * this field is not specified when creating a new instance, NOT_REQUIRED is + * used. If this field is not specified when patching or updating an existing + * instance, it is left unchanged in the instance. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Settings.ConnectorEnforcement connector_enforcement = 32; + * @param int $var + * @return $this + */ + public function setConnectorEnforcement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\Settings\ConnectorEnforcement::class); + $this->connector_enforcement = $var; + + return $this; + } + + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @return \Google\Protobuf\BoolValue|null + */ + public function getDeletionProtectionEnabled() + { + return $this->deletion_protection_enabled; + } + + public function hasDeletionProtectionEnabled() + { + return isset($this->deletion_protection_enabled); + } + + public function clearDeletionProtectionEnabled() + { + unset($this->deletion_protection_enabled); + } + + /** + * Returns the unboxed value from getDeletionProtectionEnabled() + + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @return bool|null + */ + public function getDeletionProtectionEnabledUnwrapped() + { + return $this->readWrapperValue("deletion_protection_enabled"); + } + + /** + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setDeletionProtectionEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->deletion_protection_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Configuration to protect against accidental instance deletion. + * + * Generated from protobuf field .google.protobuf.BoolValue deletion_protection_enabled = 33; + * @param bool|null $var + * @return $this + */ + public function setDeletionProtectionEnabledUnwrapped($var) + { + $this->writeWrapperValue("deletion_protection_enabled", $var); + return $this;} + + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Server timezone, relevant only for Cloud SQL for SQL Server. + * + * Generated from protobuf field string time_zone = 34; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AdvancedMachineFeatures advanced_machine_features = 35; + * @return \Google\Cloud\Sql\V1beta4\AdvancedMachineFeatures|null + */ + public function getAdvancedMachineFeatures() + { + return $this->advanced_machine_features; + } + + public function hasAdvancedMachineFeatures() + { + return isset($this->advanced_machine_features); + } + + public function clearAdvancedMachineFeatures() + { + unset($this->advanced_machine_features); + } + + /** + * Specifies advance machine configuration for the instance + * relevant only for SQL Server. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AdvancedMachineFeatures advanced_machine_features = 35; + * @param \Google\Cloud\Sql\V1beta4\AdvancedMachineFeatures $var + * @return $this + */ + public function setAdvancedMachineFeatures($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AdvancedMachineFeatures::class); + $this->advanced_machine_features = $var; + + return $this; + } + + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DataCacheConfig data_cache_config = 37; + * @return \Google\Cloud\Sql\V1beta4\DataCacheConfig|null + */ + public function getDataCacheConfig() + { + return $this->data_cache_config; + } + + public function hasDataCacheConfig() + { + return isset($this->data_cache_config); + } + + public function clearDataCacheConfig() + { + unset($this->data_cache_config); + } + + /** + * Configuration for data cache. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.DataCacheConfig data_cache_config = 37; + * @param \Google\Cloud\Sql\V1beta4\DataCacheConfig $var + * @return $this + */ + public function setDataCacheConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DataCacheConfig::class); + $this->data_cache_config = $var; + + return $this; + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnableGoogleMlIntegration() + { + return $this->enable_google_ml_integration; + } + + public function hasEnableGoogleMlIntegration() + { + return isset($this->enable_google_ml_integration); + } + + public function clearEnableGoogleMlIntegration() + { + unset($this->enable_google_ml_integration); + } + + /** + * Returns the unboxed value from getEnableGoogleMlIntegration() + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnableGoogleMlIntegrationUnwrapped() + { + return $this->readWrapperValue("enable_google_ml_integration"); + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnableGoogleMlIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_google_ml_integration = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnableGoogleMlIntegrationUnwrapped($var) + { + $this->writeWrapperValue("enable_google_ml_integration", $var); + return $this;} + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/ConnectorEnforcement.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/ConnectorEnforcement.php new file mode 100644 index 000000000000..40d6da387ba0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/ConnectorEnforcement.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1beta4.Settings.ConnectorEnforcement + */ +class ConnectorEnforcement +{ + /** + * The requirement for Cloud SQL connectors is unknown. + * + * Generated from protobuf enum CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; + */ + const CONNECTOR_ENFORCEMENT_UNSPECIFIED = 0; + /** + * Do not require Cloud SQL connectors. + * + * Generated from protobuf enum NOT_REQUIRED = 1; + */ + const NOT_REQUIRED = 1; + /** + * Require all connections to use Cloud SQL connectors, including the + * Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. + * Note: This disables all existing authorized networks. + * + * Generated from protobuf enum REQUIRED = 2; + */ + const REQUIRED = 2; + + private static $valueToName = [ + self::CONNECTOR_ENFORCEMENT_UNSPECIFIED => 'CONNECTOR_ENFORCEMENT_UNSPECIFIED', + self::NOT_REQUIRED => 'NOT_REQUIRED', + self::REQUIRED => 'REQUIRED', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConnectorEnforcement::class, \Google\Cloud\Sql\V1beta4\Settings_ConnectorEnforcement::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/Edition.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/Edition.php new file mode 100644 index 000000000000..08840ed67abc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/Edition.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1beta4.Settings.Edition + */ +class Edition +{ + /** + * The instance did not specify the edition. + * + * Generated from protobuf enum EDITION_UNSPECIFIED = 0; + */ + const EDITION_UNSPECIFIED = 0; + /** + * The instance is an enterprise edition. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + /** + * The instance is an Enterprise Plus edition. + * + * Generated from protobuf enum ENTERPRISE_PLUS = 3; + */ + const ENTERPRISE_PLUS = 3; + + private static $valueToName = [ + self::EDITION_UNSPECIFIED => 'EDITION_UNSPECIFIED', + self::ENTERPRISE => 'ENTERPRISE', + self::ENTERPRISE_PLUS => 'ENTERPRISE_PLUS', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Edition::class, \Google\Cloud\Sql\V1beta4\Settings_Edition::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/SqlActivationPolicy.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/SqlActivationPolicy.php new file mode 100644 index 000000000000..d1913db863e6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Settings/SqlActivationPolicy.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1beta4.Settings.SqlActivationPolicy + */ +class SqlActivationPolicy +{ + /** + * Unknown activation plan. + * + * Generated from protobuf enum SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + */ + const SQL_ACTIVATION_POLICY_UNSPECIFIED = 0; + /** + * The instance is always up and running. + * + * Generated from protobuf enum ALWAYS = 1; + */ + const ALWAYS = 1; + /** + * The instance never starts. + * + * Generated from protobuf enum NEVER = 2; + */ + const NEVER = 2; + /** + * The instance starts upon receiving requests. + * + * Generated from protobuf enum ON_DEMAND = 3 [deprecated = true]; + */ + const ON_DEMAND = 3; + + private static $valueToName = [ + self::SQL_ACTIVATION_POLICY_UNSPECIFIED => 'SQL_ACTIVATION_POLICY_UNSPECIFIED', + self::ALWAYS => 'ALWAYS', + self::NEVER => 'NEVER', + self::ON_DEMAND => 'ON_DEMAND', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlActivationPolicy::class, \Google\Cloud\Sql\V1beta4\Settings_SqlActivationPolicy::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlActiveDirectoryConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlActiveDirectoryConfig.php new file mode 100644 index 000000000000..1402b08419ca --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlActiveDirectoryConfig.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlActiveDirectoryConfig + */ +class SqlActiveDirectoryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + */ + protected $domain = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#activeDirectoryConfig. + * @type string $domain + * The name of the domain (e.g., mydomain.com). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#activeDirectoryConfig. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * The name of the domain (e.g., mydomain.com). + * + * Generated from protobuf field string domain = 2; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlAvailabilityType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlAvailabilityType.php new file mode 100644 index 000000000000..80b8e244fd96 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlAvailabilityType.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1beta4.SqlAvailabilityType + */ +class SqlAvailabilityType +{ + /** + * This is an unknown Availability type. + * + * Generated from protobuf enum SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + */ + const SQL_AVAILABILITY_TYPE_UNSPECIFIED = 0; + /** + * Zonal available instance. + * + * Generated from protobuf enum ZONAL = 1; + */ + const ZONAL = 1; + /** + * Regional available instance. + * + * Generated from protobuf enum REGIONAL = 2; + */ + const REGIONAL = 2; + + private static $valueToName = [ + self::SQL_AVAILABILITY_TYPE_UNSPECIFIED => 'SQL_AVAILABILITY_TYPE_UNSPECIFIED', + self::ZONAL => 'ZONAL', + self::REGIONAL => 'REGIONAL', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackendType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackendType.php new file mode 100644 index 000000000000..88db36c12af1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackendType.php @@ -0,0 +1,66 @@ +google.cloud.sql.v1beta4.SqlBackendType + */ +class SqlBackendType +{ + /** + * This is an unknown backend type for instance. + * + * Generated from protobuf enum SQL_BACKEND_TYPE_UNSPECIFIED = 0; + */ + const SQL_BACKEND_TYPE_UNSPECIFIED = 0; + /** + * V1 speckle instance. + * + * Generated from protobuf enum FIRST_GEN = 1 [deprecated = true]; + */ + const FIRST_GEN = 1; + /** + * V2 speckle instance. + * + * Generated from protobuf enum SECOND_GEN = 2; + */ + const SECOND_GEN = 2; + /** + * On premises instance. + * + * Generated from protobuf enum EXTERNAL = 3; + */ + const EXTERNAL = 3; + + private static $valueToName = [ + self::SQL_BACKEND_TYPE_UNSPECIFIED => 'SQL_BACKEND_TYPE_UNSPECIFIED', + self::FIRST_GEN => 'FIRST_GEN', + self::SECOND_GEN => 'SECOND_GEN', + self::EXTERNAL => 'EXTERNAL', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupKind.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupKind.php new file mode 100644 index 000000000000..3fd03b58591c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupKind.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1beta4.SqlBackupKind + */ +class SqlBackupKind +{ + /** + * This is an unknown BackupKind. + * + * Generated from protobuf enum SQL_BACKUP_KIND_UNSPECIFIED = 0; + */ + const SQL_BACKUP_KIND_UNSPECIFIED = 0; + /** + * The snapshot based backups + * + * Generated from protobuf enum SNAPSHOT = 1; + */ + const SNAPSHOT = 1; + /** + * Physical backups + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::SQL_BACKUP_KIND_UNSPECIFIED => 'SQL_BACKUP_KIND_UNSPECIFIED', + self::SNAPSHOT => 'SNAPSHOT', + self::PHYSICAL => 'PHYSICAL', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunStatus.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunStatus.php new file mode 100644 index 000000000000..bc5789484147 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunStatus.php @@ -0,0 +1,113 @@ +google.cloud.sql.v1beta4.SqlBackupRunStatus + */ +class SqlBackupRunStatus +{ + /** + * The status of the run is unknown. + * + * Generated from protobuf enum SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; + */ + const SQL_BACKUP_RUN_STATUS_UNSPECIFIED = 0; + /** + * The backup operation was enqueued. + * + * Generated from protobuf enum ENQUEUED = 1; + */ + const ENQUEUED = 1; + /** + * The backup is overdue across a given backup window. Indicates a + * problem. Example: Long-running operation in progress during + * the whole window. + * + * Generated from protobuf enum OVERDUE = 2; + */ + const OVERDUE = 2; + /** + * The backup is in progress. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The backup failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The backup was successful. + * + * Generated from protobuf enum SUCCESSFUL = 5; + */ + const SUCCESSFUL = 5; + /** + * The backup was skipped (without problems) for a given backup + * window. Example: Instance was idle. + * + * Generated from protobuf enum SKIPPED = 6; + */ + const SKIPPED = 6; + /** + * The backup is about to be deleted. + * + * Generated from protobuf enum DELETION_PENDING = 7; + */ + const DELETION_PENDING = 7; + /** + * The backup deletion failed. + * + * Generated from protobuf enum DELETION_FAILED = 8; + */ + const DELETION_FAILED = 8; + /** + * The backup has been deleted. + * + * Generated from protobuf enum DELETED = 9; + */ + const DELETED = 9; + + private static $valueToName = [ + self::SQL_BACKUP_RUN_STATUS_UNSPECIFIED => 'SQL_BACKUP_RUN_STATUS_UNSPECIFIED', + self::ENQUEUED => 'ENQUEUED', + self::OVERDUE => 'OVERDUE', + self::RUNNING => 'RUNNING', + self::FAILED => 'FAILED', + self::SUCCESSFUL => 'SUCCESSFUL', + self::SKIPPED => 'SKIPPED', + self::DELETION_PENDING => 'DELETION_PENDING', + self::DELETION_FAILED => 'DELETION_FAILED', + self::DELETED => 'DELETED', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunType.php new file mode 100644 index 000000000000..a4c56299a449 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunType.php @@ -0,0 +1,59 @@ +google.cloud.sql.v1beta4.SqlBackupRunType + */ +class SqlBackupRunType +{ + /** + * This is an unknown BackupRun type. + * + * Generated from protobuf enum SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; + */ + const SQL_BACKUP_RUN_TYPE_UNSPECIFIED = 0; + /** + * The backup schedule automatically triggers a backup. + * + * Generated from protobuf enum AUTOMATED = 1; + */ + const AUTOMATED = 1; + /** + * The user manually triggers a backup. + * + * Generated from protobuf enum ON_DEMAND = 2; + */ + const ON_DEMAND = 2; + + private static $valueToName = [ + self::SQL_BACKUP_RUN_TYPE_UNSPECIFIED => 'SQL_BACKUP_RUN_TYPE_UNSPECIFIED', + self::AUTOMATED => 'AUTOMATED', + self::ON_DEMAND => 'ON_DEMAND', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsDeleteRequest.php new file mode 100644 index 000000000000..43474c7cd3d1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsDeleteRequest.php @@ -0,0 +1,141 @@ +google.cloud.sql.v1beta4.SqlBackupRunsDeleteRequest + */ +class SqlBackupRunsDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) + * method. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) + * method. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsGetRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsGetRequest.php new file mode 100644 index 000000000000..e5e7f4bbdd1f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsGetRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1beta4.SqlBackupRunsGetRequest + */ +class SqlBackupRunsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + */ + protected $id = 0; + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $id + * The ID of this backup run. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * The ID of this backup run. + * + * Generated from protobuf field int64 id = 1; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsInsertRequest.php new file mode 100644 index 000000000000..dd131cffbbe5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlBackupRunsInsertRequest + */ +class SqlBackupRunsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRun body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\BackupRun $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRun body = 100; + * @return \Google\Cloud\Sql\V1beta4\BackupRun|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRun body = 100; + * @param \Google\Cloud\Sql\V1beta4\BackupRun $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\BackupRun::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsListRequest.php new file mode 100644 index 000000000000..c1a60964e297 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlBackupRunsListRequest.php @@ -0,0 +1,175 @@ +google.cloud.sql.v1beta4.SqlBackupRunsListRequest + */ +class SqlBackupRunsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * @type int $max_results + * Maximum number of backup runs per response. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of backup runs per response. + * + * Generated from protobuf field int32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkInt32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDataDiskType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDataDiskType.php new file mode 100644 index 000000000000..0562300ef6a9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDataDiskType.php @@ -0,0 +1,69 @@ +google.cloud.sql.v1beta4.SqlDataDiskType + */ +class SqlDataDiskType +{ + /** + * This is an unknown data disk type. + * + * Generated from protobuf enum SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + */ + const SQL_DATA_DISK_TYPE_UNSPECIFIED = 0; + /** + * An SSD data disk. + * + * Generated from protobuf enum PD_SSD = 1; + */ + const PD_SSD = 1; + /** + * An HDD data disk. + * + * Generated from protobuf enum PD_HDD = 2; + */ + const PD_HDD = 2; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf enum OBSOLETE_LOCAL_SSD = 3 [deprecated = true]; + */ + const OBSOLETE_LOCAL_SSD = 3; + + private static $valueToName = [ + self::SQL_DATA_DISK_TYPE_UNSPECIFIED => 'SQL_DATA_DISK_TYPE_UNSPECIFIED', + self::PD_SSD => 'PD_SSD', + self::PD_HDD => 'PD_HDD', + self::OBSOLETE_LOCAL_SSD => 'OBSOLETE_LOCAL_SSD', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabaseVersion.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabaseVersion.php new file mode 100644 index 000000000000..a5072e10aa56 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabaseVersion.php @@ -0,0 +1,327 @@ +google.cloud.sql.v1beta4.SqlDatabaseVersion + */ +class SqlDatabaseVersion +{ + /** + * This is an unknown database version. + * + * Generated from protobuf enum SQL_DATABASE_VERSION_UNSPECIFIED = 0; + */ + const SQL_DATABASE_VERSION_UNSPECIFIED = 0; + /** + * The database version is MySQL 5.1. + * + * Generated from protobuf enum MYSQL_5_1 = 2 [deprecated = true]; + */ + const MYSQL_5_1 = 2; + /** + * The database version is MySQL 5.5. + * + * Generated from protobuf enum MYSQL_5_5 = 3 [deprecated = true]; + */ + const MYSQL_5_5 = 3; + /** + * The database version is MySQL 5.6. + * + * Generated from protobuf enum MYSQL_5_6 = 5; + */ + const MYSQL_5_6 = 5; + /** + * The database version is MySQL 5.7. + * + * Generated from protobuf enum MYSQL_5_7 = 6; + */ + const MYSQL_5_7 = 6; + /** + * The database version is SQL Server 2017 Standard. + * + * Generated from protobuf enum SQLSERVER_2017_STANDARD = 11; + */ + const SQLSERVER_2017_STANDARD = 11; + /** + * The database version is SQL Server 2017 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2017_ENTERPRISE = 14; + */ + const SQLSERVER_2017_ENTERPRISE = 14; + /** + * The database version is SQL Server 2017 Express. + * + * Generated from protobuf enum SQLSERVER_2017_EXPRESS = 15; + */ + const SQLSERVER_2017_EXPRESS = 15; + /** + * The database version is SQL Server 2017 Web. + * + * Generated from protobuf enum SQLSERVER_2017_WEB = 16; + */ + const SQLSERVER_2017_WEB = 16; + /** + * The database version is PostgreSQL 9.6. + * + * Generated from protobuf enum POSTGRES_9_6 = 9; + */ + const POSTGRES_9_6 = 9; + /** + * The database version is PostgreSQL 10. + * + * Generated from protobuf enum POSTGRES_10 = 18; + */ + const POSTGRES_10 = 18; + /** + * The database version is PostgreSQL 11. + * + * Generated from protobuf enum POSTGRES_11 = 10; + */ + const POSTGRES_11 = 10; + /** + * The database version is PostgreSQL 12. + * + * Generated from protobuf enum POSTGRES_12 = 19; + */ + const POSTGRES_12 = 19; + /** + * The database version is PostgreSQL 13. + * + * Generated from protobuf enum POSTGRES_13 = 23; + */ + const POSTGRES_13 = 23; + /** + * The database version is PostgreSQL 14. + * + * Generated from protobuf enum POSTGRES_14 = 110; + */ + const POSTGRES_14 = 110; + /** + * The database version is PostgreSQL 15. + * + * Generated from protobuf enum POSTGRES_15 = 172; + */ + const POSTGRES_15 = 172; + /** + * The database version is MySQL 8. + * + * Generated from protobuf enum MYSQL_8_0 = 20; + */ + const MYSQL_8_0 = 20; + /** + * The database major version is MySQL 8.0 and the minor version is 18. + * + * Generated from protobuf enum MYSQL_8_0_18 = 41; + */ + const MYSQL_8_0_18 = 41; + /** + * The database major version is MySQL 8.0 and the minor version is 26. + * + * Generated from protobuf enum MYSQL_8_0_26 = 85; + */ + const MYSQL_8_0_26 = 85; + /** + * The database major version is MySQL 8.0 and the minor version is 27. + * + * Generated from protobuf enum MYSQL_8_0_27 = 111; + */ + const MYSQL_8_0_27 = 111; + /** + * The database major version is MySQL 8.0 and the minor version is 28. + * + * Generated from protobuf enum MYSQL_8_0_28 = 132; + */ + const MYSQL_8_0_28 = 132; + /** + * The database major version is MySQL 8.0 and the minor version is 29. + * + * Generated from protobuf enum MYSQL_8_0_29 = 148 [deprecated = true]; + */ + const MYSQL_8_0_29 = 148; + /** + * The database major version is MySQL 8.0 and the minor version is 30. + * + * Generated from protobuf enum MYSQL_8_0_30 = 174; + */ + const MYSQL_8_0_30 = 174; + /** + * The database major version is MySQL 8.0 and the minor version is 31. + * + * Generated from protobuf enum MYSQL_8_0_31 = 197; + */ + const MYSQL_8_0_31 = 197; + /** + * The database major version is MySQL 8.0 and the minor version is 32. + * + * Generated from protobuf enum MYSQL_8_0_32 = 213; + */ + const MYSQL_8_0_32 = 213; + /** + * The database major version is MySQL 8.0 and the minor version is 33. + * + * Generated from protobuf enum MYSQL_8_0_33 = 238; + */ + const MYSQL_8_0_33 = 238; + /** + * The database major version is MySQL 8.0 and the minor version is 34. + * + * Generated from protobuf enum MYSQL_8_0_34 = 239; + */ + const MYSQL_8_0_34 = 239; + /** + * The database major version is MySQL 8.0 and the minor version is 35. + * + * Generated from protobuf enum MYSQL_8_0_35 = 240; + */ + const MYSQL_8_0_35 = 240; + /** + * The database major version is MySQL 8.0 and the minor version is 36. + * + * Generated from protobuf enum MYSQL_8_0_36 = 241; + */ + const MYSQL_8_0_36 = 241; + /** + * The database major version is MySQL 8.0 and the minor version is 37. + * + * Generated from protobuf enum MYSQL_8_0_37 = 355; + */ + const MYSQL_8_0_37 = 355; + /** + * The database major version is MySQL 8.0 and the minor version is 38. + * + * Generated from protobuf enum MYSQL_8_0_38 = 356; + */ + const MYSQL_8_0_38 = 356; + /** + * The database major version is MySQL 8.0 and the minor version is 39. + * + * Generated from protobuf enum MYSQL_8_0_39 = 357; + */ + const MYSQL_8_0_39 = 357; + /** + * The database major version is MySQL 8.0 and the minor version is 40. + * + * Generated from protobuf enum MYSQL_8_0_40 = 358; + */ + const MYSQL_8_0_40 = 358; + /** + * The database version is SQL Server 2019 Standard. + * + * Generated from protobuf enum SQLSERVER_2019_STANDARD = 26; + */ + const SQLSERVER_2019_STANDARD = 26; + /** + * The database version is SQL Server 2019 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2019_ENTERPRISE = 27; + */ + const SQLSERVER_2019_ENTERPRISE = 27; + /** + * The database version is SQL Server 2019 Express. + * + * Generated from protobuf enum SQLSERVER_2019_EXPRESS = 28; + */ + const SQLSERVER_2019_EXPRESS = 28; + /** + * The database version is SQL Server 2019 Web. + * + * Generated from protobuf enum SQLSERVER_2019_WEB = 29; + */ + const SQLSERVER_2019_WEB = 29; + /** + * The database version is SQL Server 2022 Standard. + * + * Generated from protobuf enum SQLSERVER_2022_STANDARD = 199; + */ + const SQLSERVER_2022_STANDARD = 199; + /** + * The database version is SQL Server 2022 Enterprise. + * + * Generated from protobuf enum SQLSERVER_2022_ENTERPRISE = 200; + */ + const SQLSERVER_2022_ENTERPRISE = 200; + /** + * The database version is SQL Server 2022 Express. + * + * Generated from protobuf enum SQLSERVER_2022_EXPRESS = 201; + */ + const SQLSERVER_2022_EXPRESS = 201; + /** + * The database version is SQL Server 2022 Web. + * + * Generated from protobuf enum SQLSERVER_2022_WEB = 202; + */ + const SQLSERVER_2022_WEB = 202; + + private static $valueToName = [ + self::SQL_DATABASE_VERSION_UNSPECIFIED => 'SQL_DATABASE_VERSION_UNSPECIFIED', + self::MYSQL_5_1 => 'MYSQL_5_1', + self::MYSQL_5_5 => 'MYSQL_5_5', + self::MYSQL_5_6 => 'MYSQL_5_6', + self::MYSQL_5_7 => 'MYSQL_5_7', + self::SQLSERVER_2017_STANDARD => 'SQLSERVER_2017_STANDARD', + self::SQLSERVER_2017_ENTERPRISE => 'SQLSERVER_2017_ENTERPRISE', + self::SQLSERVER_2017_EXPRESS => 'SQLSERVER_2017_EXPRESS', + self::SQLSERVER_2017_WEB => 'SQLSERVER_2017_WEB', + self::POSTGRES_9_6 => 'POSTGRES_9_6', + self::POSTGRES_10 => 'POSTGRES_10', + self::POSTGRES_11 => 'POSTGRES_11', + self::POSTGRES_12 => 'POSTGRES_12', + self::POSTGRES_13 => 'POSTGRES_13', + self::POSTGRES_14 => 'POSTGRES_14', + self::POSTGRES_15 => 'POSTGRES_15', + self::MYSQL_8_0 => 'MYSQL_8_0', + self::MYSQL_8_0_18 => 'MYSQL_8_0_18', + self::MYSQL_8_0_26 => 'MYSQL_8_0_26', + self::MYSQL_8_0_27 => 'MYSQL_8_0_27', + self::MYSQL_8_0_28 => 'MYSQL_8_0_28', + self::MYSQL_8_0_29 => 'MYSQL_8_0_29', + self::MYSQL_8_0_30 => 'MYSQL_8_0_30', + self::MYSQL_8_0_31 => 'MYSQL_8_0_31', + self::MYSQL_8_0_32 => 'MYSQL_8_0_32', + self::MYSQL_8_0_33 => 'MYSQL_8_0_33', + self::MYSQL_8_0_34 => 'MYSQL_8_0_34', + self::MYSQL_8_0_35 => 'MYSQL_8_0_35', + self::MYSQL_8_0_36 => 'MYSQL_8_0_36', + self::MYSQL_8_0_37 => 'MYSQL_8_0_37', + self::MYSQL_8_0_38 => 'MYSQL_8_0_38', + self::MYSQL_8_0_39 => 'MYSQL_8_0_39', + self::MYSQL_8_0_40 => 'MYSQL_8_0_40', + self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD', + self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE', + self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS', + self::SQLSERVER_2019_WEB => 'SQLSERVER_2019_WEB', + self::SQLSERVER_2022_STANDARD => 'SQLSERVER_2022_STANDARD', + self::SQLSERVER_2022_ENTERPRISE => 'SQLSERVER_2022_ENTERPRISE', + self::SQLSERVER_2022_EXPRESS => 'SQLSERVER_2022_EXPRESS', + self::SQLSERVER_2022_WEB => 'SQLSERVER_2022_WEB', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesDeleteRequest.php new file mode 100644 index 000000000000..0890960e2fa4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesDeleteRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1beta4.SqlDatabasesDeleteRequest + */ +class SqlDatabasesDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database to be deleted in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database to be deleted in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesGetRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesGetRequest.php new file mode 100644 index 000000000000..5bd9d2cb911c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesGetRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1beta4.SqlDatabasesGetRequest + */ +class SqlDatabasesGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesInsertRequest.php new file mode 100644 index 000000000000..bee665845be2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlDatabasesInsertRequest + */ +class SqlDatabasesInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.Database body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\Database $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.Database body = 100; + * @return \Google\Cloud\Sql\V1beta4\Database|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.Database body = 100; + * @param \Google\Cloud\Sql\V1beta4\Database $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\Database::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesListRequest.php new file mode 100644 index 000000000000..34202b168421 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlDatabasesListRequest + */ +class SqlDatabasesListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesUpdateRequest.php new file mode 100644 index 000000000000..a6cf6acdd828 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlDatabasesUpdateRequest.php @@ -0,0 +1,170 @@ +google.cloud.sql.v1beta4.SqlDatabasesUpdateRequest + */ +class SqlDatabasesUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.Database body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Name of the database to be updated in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\Database $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Name of the database to be updated in the instance. + * + * Generated from protobuf field string database = 1; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.Database body = 100; + * @return \Google\Cloud\Sql\V1beta4\Database|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.Database body = 100; + * @param \Google\Cloud\Sql\V1beta4\Database $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\Database::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError.php new file mode 100644 index 000000000000..6a475a6c78db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError.php @@ -0,0 +1,139 @@ +google.cloud.sql.v1beta4.SqlExternalSyncSettingError + */ +class SqlExternalSyncSettingError extends \Google\Protobuf\Internal\Message +{ + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + */ + protected $type = 0; + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + */ + protected $detail = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * @type int $type + * Identifies the specific error that occurred. + * @type string $detail + * Additional information about the error encountered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Can be `sql#externalSyncSettingError` or + * `sql#externalSyncSettingWarning`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Identifies the specific error that occurred. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError\SqlExternalSyncSettingErrorType::class); + $this->type = $var; + + return $this; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + * @return string + */ + public function getDetail() + { + return $this->detail; + } + + /** + * Additional information about the error encountered. + * + * Generated from protobuf field string detail = 3; + * @param string $var + * @return $this + */ + public function setDetail($var) + { + GPBUtil::checkString($var, True); + $this->detail = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php new file mode 100644 index 000000000000..0283ca788414 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php @@ -0,0 +1,360 @@ +google.cloud.sql.v1beta4.SqlExternalSyncSettingError.SqlExternalSyncSettingErrorType + */ +class SqlExternalSyncSettingErrorType +{ + /** + * Generated from protobuf enum SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; + */ + const SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum CONNECTION_FAILURE = 1; + */ + const CONNECTION_FAILURE = 1; + /** + * Generated from protobuf enum BINLOG_NOT_ENABLED = 2; + */ + const BINLOG_NOT_ENABLED = 2; + /** + * Generated from protobuf enum INCOMPATIBLE_DATABASE_VERSION = 3; + */ + const INCOMPATIBLE_DATABASE_VERSION = 3; + /** + * Generated from protobuf enum REPLICA_ALREADY_SETUP = 4; + */ + const REPLICA_ALREADY_SETUP = 4; + /** + * The replication user is missing privileges that are required. + * + * Generated from protobuf enum INSUFFICIENT_PRIVILEGE = 5; + */ + const INSUFFICIENT_PRIVILEGE = 5; + /** + * Unsupported migration type. + * + * Generated from protobuf enum UNSUPPORTED_MIGRATION_TYPE = 6; + */ + const UNSUPPORTED_MIGRATION_TYPE = 6; + /** + * No pglogical extension installed on databases, applicable for postgres. + * + * Generated from protobuf enum NO_PGLOGICAL_INSTALLED = 7; + */ + const NO_PGLOGICAL_INSTALLED = 7; + /** + * pglogical node already exists on databases, applicable for postgres. + * + * Generated from protobuf enum PGLOGICAL_NODE_ALREADY_EXISTS = 8; + */ + const PGLOGICAL_NODE_ALREADY_EXISTS = 8; + /** + * The value of parameter wal_level is not set to logical. + * + * Generated from protobuf enum INVALID_WAL_LEVEL = 9; + */ + const INVALID_WAL_LEVEL = 9; + /** + * The value of parameter shared_preload_libraries does not include + * pglogical. + * + * Generated from protobuf enum INVALID_SHARED_PRELOAD_LIBRARY = 10; + */ + const INVALID_SHARED_PRELOAD_LIBRARY = 10; + /** + * The value of parameter max_replication_slots is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + */ + const INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; + /** + * The value of parameter max_wal_senders is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_WAL_SENDERS = 12; + */ + const INSUFFICIENT_MAX_WAL_SENDERS = 12; + /** + * The value of parameter max_worker_processes is not sufficient. + * + * Generated from protobuf enum INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + */ + const INSUFFICIENT_MAX_WORKER_PROCESSES = 13; + /** + * Extensions installed are either not supported or having unsupported + * versions + * + * Generated from protobuf enum UNSUPPORTED_EXTENSIONS = 14; + */ + const UNSUPPORTED_EXTENSIONS = 14; + /** + * The value of parameter rds.logical_replication is not set to 1. + * + * Generated from protobuf enum INVALID_RDS_LOGICAL_REPLICATION = 15; + */ + const INVALID_RDS_LOGICAL_REPLICATION = 15; + /** + * The primary instance logging setup doesn't allow EM sync. + * + * Generated from protobuf enum INVALID_LOGGING_SETUP = 16; + */ + const INVALID_LOGGING_SETUP = 16; + /** + * The primary instance database parameter setup doesn't allow EM sync. + * + * Generated from protobuf enum INVALID_DB_PARAM = 17; + */ + const INVALID_DB_PARAM = 17; + /** + * The gtid_mode is not supported, applicable for MySQL. + * + * Generated from protobuf enum UNSUPPORTED_GTID_MODE = 18; + */ + const UNSUPPORTED_GTID_MODE = 18; + /** + * SQL Server Agent is not running. + * + * Generated from protobuf enum SQLSERVER_AGENT_NOT_RUNNING = 19; + */ + const SQLSERVER_AGENT_NOT_RUNNING = 19; + /** + * The table definition is not support due to missing primary key or replica + * identity, applicable for postgres. + * + * Generated from protobuf enum UNSUPPORTED_TABLE_DEFINITION = 20; + */ + const UNSUPPORTED_TABLE_DEFINITION = 20; + /** + * The customer has a definer that will break EM setup. + * + * Generated from protobuf enum UNSUPPORTED_DEFINER = 21; + */ + const UNSUPPORTED_DEFINER = 21; + /** + * SQL Server @@SERVERNAME does not match actual host name. + * + * Generated from protobuf enum SQLSERVER_SERVERNAME_MISMATCH = 22; + */ + const SQLSERVER_SERVERNAME_MISMATCH = 22; + /** + * The primary instance has been setup and will fail the setup. + * + * Generated from protobuf enum PRIMARY_ALREADY_SETUP = 23; + */ + const PRIMARY_ALREADY_SETUP = 23; + /** + * The primary instance has unsupported binary log format. + * + * Generated from protobuf enum UNSUPPORTED_BINLOG_FORMAT = 24; + */ + const UNSUPPORTED_BINLOG_FORMAT = 24; + /** + * The primary instance's binary log retention setting. + * + * Generated from protobuf enum BINLOG_RETENTION_SETTING = 25; + */ + const BINLOG_RETENTION_SETTING = 25; + /** + * The primary instance has tables with unsupported storage engine. + * + * Generated from protobuf enum UNSUPPORTED_STORAGE_ENGINE = 26; + */ + const UNSUPPORTED_STORAGE_ENGINE = 26; + /** + * Source has tables with limited support + * eg: PostgreSQL tables without primary keys. + * + * Generated from protobuf enum LIMITED_SUPPORT_TABLES = 27; + */ + const LIMITED_SUPPORT_TABLES = 27; + /** + * The replica instance contains existing data. + * + * Generated from protobuf enum EXISTING_DATA_IN_REPLICA = 28; + */ + const EXISTING_DATA_IN_REPLICA = 28; + /** + * The replication user is missing privileges that are optional. + * + * Generated from protobuf enum MISSING_OPTIONAL_PRIVILEGES = 29; + */ + const MISSING_OPTIONAL_PRIVILEGES = 29; + /** + * Additional BACKUP_ADMIN privilege is granted to the replication user + * which may lock source MySQL 8 instance for DDLs during initial sync. + * + * Generated from protobuf enum RISKY_BACKUP_ADMIN_PRIVILEGE = 30; + */ + const RISKY_BACKUP_ADMIN_PRIVILEGE = 30; + /** + * The Cloud Storage bucket is missing necessary permissions. + * + * Generated from protobuf enum INSUFFICIENT_GCS_PERMISSIONS = 31; + */ + const INSUFFICIENT_GCS_PERMISSIONS = 31; + /** + * The Cloud Storage bucket has an error in the file or contains invalid + * file information. + * + * Generated from protobuf enum INVALID_FILE_INFO = 32; + */ + const INVALID_FILE_INFO = 32; + /** + * The source instance has unsupported database settings for migration. + * + * Generated from protobuf enum UNSUPPORTED_DATABASE_SETTINGS = 33; + */ + const UNSUPPORTED_DATABASE_SETTINGS = 33; + /** + * The replication user is missing parallel import specific privileges. + * (e.g. LOCK TABLES) for MySQL. + * + * Generated from protobuf enum MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; + */ + const MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE = 34; + /** + * The global variable local_infile is off on external server replica. + * + * Generated from protobuf enum LOCAL_INFILE_OFF = 35; + */ + const LOCAL_INFILE_OFF = 35; + /** + * This code instructs customers to turn on point-in-time recovery manually + * for the instance after promoting the Cloud SQL for PostgreSQL instance. + * + * Generated from protobuf enum TURN_ON_PITR_AFTER_PROMOTE = 36; + */ + const TURN_ON_PITR_AFTER_PROMOTE = 36; + /** + * The minor version of replica database is incompatible with the source. + * + * Generated from protobuf enum INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; + */ + const INCOMPATIBLE_DATABASE_MINOR_VERSION = 37; + /** + * This warning message indicates that Cloud SQL uses the maximum number of + * subscriptions to migrate data from the source to the destination. + * + * Generated from protobuf enum SOURCE_MAX_SUBSCRIPTIONS = 38; + */ + const SOURCE_MAX_SUBSCRIPTIONS = 38; + /** + * Unable to verify definers on the source for MySQL. + * + * Generated from protobuf enum UNABLE_TO_VERIFY_DEFINERS = 39; + */ + const UNABLE_TO_VERIFY_DEFINERS = 39; + /** + * If a time out occurs while the subscription counts are calculated, then + * this value is set to 1. Otherwise, this value is set to 2. + * + * Generated from protobuf enum SUBSCRIPTION_CALCULATION_STATUS = 40; + */ + const SUBSCRIPTION_CALCULATION_STATUS = 40; + /** + * Count of subscriptions needed to sync source data for PostgreSQL + * database. + * + * Generated from protobuf enum PG_SUBSCRIPTION_COUNT = 41; + */ + const PG_SUBSCRIPTION_COUNT = 41; + /** + * Final parallel level that is used to do migration. + * + * Generated from protobuf enum PG_SYNC_PARALLEL_LEVEL = 42; + */ + const PG_SYNC_PARALLEL_LEVEL = 42; + /** + * The disk size of the replica instance is smaller than the data size of + * the source instance. + * + * Generated from protobuf enum INSUFFICIENT_DISK_SIZE = 43; + */ + const INSUFFICIENT_DISK_SIZE = 43; + /** + * The data size of the source instance is greater than 1 TB, the number of + * cores of the replica instance is less than 8, and the memory of the + * replica is less than 32 GB. + * + * Generated from protobuf enum INSUFFICIENT_MACHINE_TIER = 44; + */ + const INSUFFICIENT_MACHINE_TIER = 44; + + private static $valueToName = [ + self::SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED => 'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED', + self::CONNECTION_FAILURE => 'CONNECTION_FAILURE', + self::BINLOG_NOT_ENABLED => 'BINLOG_NOT_ENABLED', + self::INCOMPATIBLE_DATABASE_VERSION => 'INCOMPATIBLE_DATABASE_VERSION', + self::REPLICA_ALREADY_SETUP => 'REPLICA_ALREADY_SETUP', + self::INSUFFICIENT_PRIVILEGE => 'INSUFFICIENT_PRIVILEGE', + self::UNSUPPORTED_MIGRATION_TYPE => 'UNSUPPORTED_MIGRATION_TYPE', + self::NO_PGLOGICAL_INSTALLED => 'NO_PGLOGICAL_INSTALLED', + self::PGLOGICAL_NODE_ALREADY_EXISTS => 'PGLOGICAL_NODE_ALREADY_EXISTS', + self::INVALID_WAL_LEVEL => 'INVALID_WAL_LEVEL', + self::INVALID_SHARED_PRELOAD_LIBRARY => 'INVALID_SHARED_PRELOAD_LIBRARY', + self::INSUFFICIENT_MAX_REPLICATION_SLOTS => 'INSUFFICIENT_MAX_REPLICATION_SLOTS', + self::INSUFFICIENT_MAX_WAL_SENDERS => 'INSUFFICIENT_MAX_WAL_SENDERS', + self::INSUFFICIENT_MAX_WORKER_PROCESSES => 'INSUFFICIENT_MAX_WORKER_PROCESSES', + self::UNSUPPORTED_EXTENSIONS => 'UNSUPPORTED_EXTENSIONS', + self::INVALID_RDS_LOGICAL_REPLICATION => 'INVALID_RDS_LOGICAL_REPLICATION', + self::INVALID_LOGGING_SETUP => 'INVALID_LOGGING_SETUP', + self::INVALID_DB_PARAM => 'INVALID_DB_PARAM', + self::UNSUPPORTED_GTID_MODE => 'UNSUPPORTED_GTID_MODE', + self::SQLSERVER_AGENT_NOT_RUNNING => 'SQLSERVER_AGENT_NOT_RUNNING', + self::UNSUPPORTED_TABLE_DEFINITION => 'UNSUPPORTED_TABLE_DEFINITION', + self::UNSUPPORTED_DEFINER => 'UNSUPPORTED_DEFINER', + self::SQLSERVER_SERVERNAME_MISMATCH => 'SQLSERVER_SERVERNAME_MISMATCH', + self::PRIMARY_ALREADY_SETUP => 'PRIMARY_ALREADY_SETUP', + self::UNSUPPORTED_BINLOG_FORMAT => 'UNSUPPORTED_BINLOG_FORMAT', + self::BINLOG_RETENTION_SETTING => 'BINLOG_RETENTION_SETTING', + self::UNSUPPORTED_STORAGE_ENGINE => 'UNSUPPORTED_STORAGE_ENGINE', + self::LIMITED_SUPPORT_TABLES => 'LIMITED_SUPPORT_TABLES', + self::EXISTING_DATA_IN_REPLICA => 'EXISTING_DATA_IN_REPLICA', + self::MISSING_OPTIONAL_PRIVILEGES => 'MISSING_OPTIONAL_PRIVILEGES', + self::RISKY_BACKUP_ADMIN_PRIVILEGE => 'RISKY_BACKUP_ADMIN_PRIVILEGE', + self::INSUFFICIENT_GCS_PERMISSIONS => 'INSUFFICIENT_GCS_PERMISSIONS', + self::INVALID_FILE_INFO => 'INVALID_FILE_INFO', + self::UNSUPPORTED_DATABASE_SETTINGS => 'UNSUPPORTED_DATABASE_SETTINGS', + self::MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE => 'MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE', + self::LOCAL_INFILE_OFF => 'LOCAL_INFILE_OFF', + self::TURN_ON_PITR_AFTER_PROMOTE => 'TURN_ON_PITR_AFTER_PROMOTE', + self::INCOMPATIBLE_DATABASE_MINOR_VERSION => 'INCOMPATIBLE_DATABASE_MINOR_VERSION', + self::SOURCE_MAX_SUBSCRIPTIONS => 'SOURCE_MAX_SUBSCRIPTIONS', + self::UNABLE_TO_VERIFY_DEFINERS => 'UNABLE_TO_VERIFY_DEFINERS', + self::SUBSCRIPTION_CALCULATION_STATUS => 'SUBSCRIPTION_CALCULATION_STATUS', + self::PG_SUBSCRIPTION_COUNT => 'PG_SUBSCRIPTION_COUNT', + self::PG_SYNC_PARALLEL_LEVEL => 'PG_SYNC_PARALLEL_LEVEL', + self::INSUFFICIENT_DISK_SIZE => 'INSUFFICIENT_DISK_SIZE', + self::INSUFFICIENT_MACHINE_TIER => 'INSUFFICIENT_MACHINE_TIER', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlExternalSyncSettingErrorType::class, \Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError_SqlExternalSyncSettingErrorType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFileType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFileType.php new file mode 100644 index 000000000000..4678372db071 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFileType.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1beta4.SqlFileType + */ +class SqlFileType +{ + /** + * Unknown file type. + * + * Generated from protobuf enum SQL_FILE_TYPE_UNSPECIFIED = 0; + */ + const SQL_FILE_TYPE_UNSPECIFIED = 0; + /** + * File containing SQL statements. + * + * Generated from protobuf enum SQL = 1; + */ + const SQL = 1; + /** + * File in CSV format. + * + * Generated from protobuf enum CSV = 2; + */ + const CSV = 2; + /** + * Generated from protobuf enum BAK = 4; + */ + const BAK = 4; + + private static $valueToName = [ + self::SQL_FILE_TYPE_UNSPECIFIED => 'SQL_FILE_TYPE_UNSPECIFIED', + self::SQL => 'SQL', + self::CSV => 'CSV', + self::BAK => 'BAK', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagType.php new file mode 100644 index 000000000000..1418b4af54b2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagType.php @@ -0,0 +1,95 @@ +google.cloud.sql.v1beta4.SqlFlagType + */ +class SqlFlagType +{ + /** + * This is an unknown flag type. + * + * Generated from protobuf enum SQL_FLAG_TYPE_UNSPECIFIED = 0; + */ + const SQL_FLAG_TYPE_UNSPECIFIED = 0; + /** + * Boolean type flag. + * + * Generated from protobuf enum BOOLEAN = 1; + */ + const BOOLEAN = 1; + /** + * String type flag. + * + * Generated from protobuf enum STRING = 2; + */ + const STRING = 2; + /** + * Integer type flag. + * + * Generated from protobuf enum INTEGER = 3; + */ + const INTEGER = 3; + /** + * Flag type used for a server startup option. + * + * Generated from protobuf enum NONE = 4; + */ + const NONE = 4; + /** + * Type introduced specially for MySQL TimeZone offset. Accept a string value + * with the format [-12:59, 13:00]. + * + * Generated from protobuf enum MYSQL_TIMEZONE_OFFSET = 5; + */ + const MYSQL_TIMEZONE_OFFSET = 5; + /** + * Float type flag. + * + * Generated from protobuf enum FLOAT = 6; + */ + const FLOAT = 6; + /** + * Comma-separated list of the strings in a SqlFlagType enum. + * + * Generated from protobuf enum REPEATED_STRING = 7; + */ + const REPEATED_STRING = 7; + + private static $valueToName = [ + self::SQL_FLAG_TYPE_UNSPECIFIED => 'SQL_FLAG_TYPE_UNSPECIFIED', + self::BOOLEAN => 'BOOLEAN', + self::STRING => 'STRING', + self::INTEGER => 'INTEGER', + self::NONE => 'NONE', + self::MYSQL_TIMEZONE_OFFSET => 'MYSQL_TIMEZONE_OFFSET', + self::FLOAT => 'FLOAT', + self::REPEATED_STRING => 'REPEATED_STRING', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagsListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagsListRequest.php new file mode 100644 index 000000000000..2eaa51c3e73e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlFlagsListRequest.php @@ -0,0 +1,69 @@ +google.cloud.sql.v1beta4.SqlFlagsListRequest + */ +class SqlFlagsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + */ + protected $database_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database_version + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + * @return string + */ + public function getDatabaseVersion() + { + return $this->database_version; + } + + /** + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * + * Generated from protobuf field string database_version = 1; + * @param string $var + * @return $this + */ + public function setDatabaseVersion($var) + { + GPBUtil::checkString($var, True); + $this->database_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstanceType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstanceType.php new file mode 100644 index 000000000000..6d246cf06466 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstanceType.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1beta4.SqlInstanceType + */ +class SqlInstanceType +{ + /** + * This is an unknown Cloud SQL instance type. + * + * Generated from protobuf enum SQL_INSTANCE_TYPE_UNSPECIFIED = 0; + */ + const SQL_INSTANCE_TYPE_UNSPECIFIED = 0; + /** + * A regular Cloud SQL instance that is not replicating from a primary + * instance. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 1; + */ + const CLOUD_SQL_INSTANCE = 1; + /** + * An instance running on the customer's premises that is not managed by + * Cloud SQL. + * + * Generated from protobuf enum ON_PREMISES_INSTANCE = 2; + */ + const ON_PREMISES_INSTANCE = 2; + /** + * A Cloud SQL instance acting as a read-replica. + * + * Generated from protobuf enum READ_REPLICA_INSTANCE = 3; + */ + const READ_REPLICA_INSTANCE = 3; + + private static $valueToName = [ + self::SQL_INSTANCE_TYPE_UNSPECIFIED => 'SQL_INSTANCE_TYPE_UNSPECIFIED', + self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', + self::ON_PREMISES_INSTANCE => 'ON_PREMISES_INSTANCE', + self::READ_REPLICA_INSTANCE => 'READ_REPLICA_INSTANCE', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..63f42f54148d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,161 @@ +google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest + */ +class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * The body for request to acquire an SSRS lease. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. ID of the project that contains the instance (Example: + * project-id). + * @type \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest $body + * The body for request to acquire an SSRS lease. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The body for request to acquire an SSRS lease. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * The body for request to acquire an SSRS lease. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php new file mode 100644 index 000000000000..e57cd9680326 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseResponse + */ +class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field optional string operation_id = 1; + */ + protected $operation_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field optional string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return isset($this->operation_id) ? $this->operation_id : ''; + } + + public function hasOperationId() + { + return isset($this->operation_id); + } + + public function clearOperationId() + { + unset($this->operation_id); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field optional string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAddServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAddServerCaRequest.php new file mode 100644 index 000000000000..17c9be4e394a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesAddServerCaRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesAddServerCaRequest + */ +class SqlInstancesAddServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCloneRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCloneRequest.php new file mode 100644 index 000000000000..5204da12a660 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCloneRequest.php @@ -0,0 +1,140 @@ +google.cloud.sql.v1beta4.SqlInstancesCloneRequest + */ +class SqlInstancesCloneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesCloneRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * @type string $project + * Project ID of the source as well as the clone Cloud SQL instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesCloneRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the source as well as the clone Cloud SQL instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesCloneRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesCloneRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesCloneRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesCloneRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesCloneRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCreateEphemeralCertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCreateEphemeralCertRequest.php new file mode 100644 index 000000000000..cf5de437c29b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesCreateEphemeralCertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesCreateEphemeralCertRequest + */ +class SqlInstancesCreateEphemeralCertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertsCreateEphemeralRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type \Google\Cloud\Sql\V1beta4\SslCertsCreateEphemeralRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertsCreateEphemeralRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\SslCertsCreateEphemeralRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertsCreateEphemeralRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\SslCertsCreateEphemeralRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCertsCreateEphemeralRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDeleteRequest.php new file mode 100644 index 000000000000..c97cc75686be --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDeleteRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesDeleteRequest + */ +class SqlInstancesDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be deleted. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteMasterRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteMasterRequest.php new file mode 100644 index 000000000000..d99d99884194 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteMasterRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesDemoteMasterRequest + */ +class SqlInstancesDemoteMasterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesDemoteMasterRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance name. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesDemoteMasterRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesDemoteMasterRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesDemoteMasterRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesDemoteMasterRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesDemoteMasterRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesDemoteMasterRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteRequest.php new file mode 100644 index 000000000000..ed92c8b87432 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesDemoteRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1beta4.SqlInstancesDemoteRequest + */ +class SqlInstancesDemoteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Cloud SQL instance. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. The project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + /** + * The request body. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesDemoteRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. The name of the Cloud SQL instance. + * @type string $project + * Required. The project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesDemoteRequest $body + * The request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Cloud SQL instance. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. The name of the Cloud SQL instance. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. The project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The request body. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesDemoteRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesDemoteRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * The request body. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesDemoteRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesDemoteRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesDemoteRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesExportRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesExportRequest.php new file mode 100644 index 000000000000..6ab256e02712 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesExportRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesExportRequest + */ +class SqlInstancesExportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud SQL instance ID. This doesn't include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesExportRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * The Cloud SQL instance ID. This doesn't include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be exported. + * @type \Google\Cloud\Sql\V1beta4\InstancesExportRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud SQL instance ID. This doesn't include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The Cloud SQL instance ID. This doesn't include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be exported. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesExportRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesExportRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesExportRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesExportRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesExportRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesFailoverRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesFailoverRequest.php new file mode 100644 index 000000000000..95348145890f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesFailoverRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesFailoverRequest + */ +class SqlInstancesFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesFailoverRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the read replica. + * @type \Google\Cloud\Sql\V1beta4\InstancesFailoverRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesFailoverRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesFailoverRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesFailoverRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesFailoverRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesFailoverRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigRequest.php new file mode 100644 index 000000000000..8834212ed430 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlInstancesGetDiskShrinkConfigRequest + */ +class SqlInstancesGetDiskShrinkConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigResponse.php new file mode 100644 index 000000000000..a15d8f1cf24e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetDiskShrinkConfigResponse.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1beta4.SqlInstancesGetDiskShrinkConfigResponse + */ +class SqlInstancesGetDiskShrinkConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + */ + protected $minimal_target_size_gb = 0; + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#getDiskShrinkConfig`. + * @type int|string $minimal_target_size_gb + * The minimum size to which a disk can be shrunk in GigaBytes. + * @type string $message + * Additional message to customers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#getDiskShrinkConfig`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + * @return int|string + */ + public function getMinimalTargetSizeGb() + { + return $this->minimal_target_size_gb; + } + + /** + * The minimum size to which a disk can be shrunk in GigaBytes. + * + * Generated from protobuf field int64 minimal_target_size_gb = 2; + * @param int|string $var + * @return $this + */ + public function setMinimalTargetSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->minimal_target_size_gb = $var; + + return $this; + } + + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Additional message to customers. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeRequest.php new file mode 100644 index 000000000000..a461b3e61c44 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlInstancesGetLatestRecoveryTimeRequest + */ +class SqlInstancesGetLatestRecoveryTimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeResponse.php new file mode 100644 index 000000000000..b8b8d37abd78 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetLatestRecoveryTimeResponse.php @@ -0,0 +1,111 @@ +google.cloud.sql.v1beta4.SqlInstancesGetLatestRecoveryTimeResponse + */ +class SqlInstancesGetLatestRecoveryTimeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + */ + protected $latest_recovery_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#getLatestRecoveryTime`. + * @type \Google\Protobuf\Timestamp $latest_recovery_time + * Timestamp, identifies the latest recovery time of the source instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#getLatestRecoveryTime`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestRecoveryTime() + { + return $this->latest_recovery_time; + } + + public function hasLatestRecoveryTime() + { + return isset($this->latest_recovery_time); + } + + public function clearLatestRecoveryTime() + { + unset($this->latest_recovery_time); + } + + /** + * Timestamp, identifies the latest recovery time of the source instance. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_recovery_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestRecoveryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_recovery_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetRequest.php new file mode 100644 index 000000000000..11d0aea7d808 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesGetRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesGetRequest + */ +class SqlInstancesGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesImportRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesImportRequest.php new file mode 100644 index 000000000000..4ca5a4fce422 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesImportRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesImportRequest + */ +class SqlInstancesImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesImportRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesImportRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesImportRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesImportRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesImportRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesImportRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesImportRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesInsertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesInsertRequest.php new file mode 100644 index 000000000000..83a688084f96 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesInsertRequest.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1beta4.SqlInstancesInsertRequest + */ +class SqlInstancesInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * @type \Google\Cloud\Sql\V1beta4\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * + * Generated from protobuf field string project = 1; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1beta4\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1beta4\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListRequest.php new file mode 100644 index 000000000000..052dcb800f30 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListRequest.php @@ -0,0 +1,211 @@ +google.cloud.sql.v1beta4.SqlInstancesListRequest + */ +class SqlInstancesListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + */ + protected $filter = ''; + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * @type int $max_results + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project for which to list Cloud SQL instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * + * Generated from protobuf field string filter = 1; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * + * Generated from protobuf field uint32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project for which to list Cloud SQL instances. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListServerCasRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListServerCasRequest.php new file mode 100644 index 000000000000..2adc06c6650c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesListServerCasRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesListServerCasRequest + */ +class SqlInstancesListServerCasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPatchRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPatchRequest.php new file mode 100644 index 000000000000..b06cd891521d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPatchRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesPatchRequest + */ +class SqlInstancesPatchRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1beta4\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1beta4\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPerformDiskShrinkRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPerformDiskShrinkRequest.php new file mode 100644 index 000000000000..a853b77dfc78 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPerformDiskShrinkRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1beta4.SqlInstancesPerformDiskShrinkRequest + */ +class SqlInstancesPerformDiskShrinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PerformDiskShrinkContext body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\PerformDiskShrinkContext $body + * Perform disk shrink context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PerformDiskShrinkContext body = 100; + * @return \Google\Cloud\Sql\V1beta4\PerformDiskShrinkContext|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Perform disk shrink context. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PerformDiskShrinkContext body = 100; + * @param \Google\Cloud\Sql\V1beta4\PerformDiskShrinkContext $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\PerformDiskShrinkContext::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPromoteReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPromoteReplicaRequest.php new file mode 100644 index 000000000000..c5ec70a6b8b1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesPromoteReplicaRequest.php @@ -0,0 +1,141 @@ +google.cloud.sql.v1beta4.SqlInstancesPromoteReplicaRequest + */ +class SqlInstancesPromoteReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * + * Generated from protobuf field bool failover = 3; + */ + protected $failover = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @type bool $failover + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * + * Generated from protobuf field bool failover = 3; + * @return bool + */ + public function getFailover() + { + return $this->failover; + } + + /** + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * + * Generated from protobuf field bool failover = 3; + * @param bool $var + * @return $this + */ + public function setFailover($var) + { + GPBUtil::checkBool($var); + $this->failover = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReencryptRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReencryptRequest.php new file mode 100644 index 000000000000..a5aa3bc7d8e4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReencryptRequest.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1beta4.SqlInstancesReencryptRequest + */ +class SqlInstancesReencryptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesReencryptRequest body = 3; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesReencryptRequest $body + * Reencrypt body that users request + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesReencryptRequest body = 3; + * @return \Google\Cloud\Sql\V1beta4\InstancesReencryptRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Reencrypt body that users request + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesReencryptRequest body = 3; + * @param \Google\Cloud\Sql\V1beta4\InstancesReencryptRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesReencryptRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php new file mode 100644 index 000000000000..74a4a450c731 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php @@ -0,0 +1,117 @@ +google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest + */ +class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = ''; + /** + * Required. The ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. The ID of the project that contains the instance (Example: + * project-id). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. The ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php new file mode 100644 index 000000000000..ce9c59dd47dc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseResponse + */ +class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The operation ID. + * + * Generated from protobuf field string operation_id = 1; + */ + protected $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The operation ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The operation ID. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The operation ID. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequest.php new file mode 100644 index 000000000000..2d6db18bfd32 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequest + */ +class SqlInstancesRescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + * @return \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody body = 100; + * @param \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody.php new file mode 100644 index 000000000000..64405b2a385d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody + */ +class SqlInstancesRescheduleMaintenanceRequestBody extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + */ + protected $reschedule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $reschedule + * Required. The type of the reschedule the user wants. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + * @return \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule|null + */ + public function getReschedule() + { + return $this->reschedule; + } + + public function hasReschedule() + { + return isset($this->reschedule); + } + + public function clearReschedule() + { + unset($this->reschedule); + } + + /** + * Required. The type of the reschedule the user wants. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule reschedule = 3; + * @param \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule $var + * @return $this + */ + public function setReschedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody\Reschedule::class); + $this->reschedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php new file mode 100644 index 000000000000..91f41a1ff363 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/Reschedule.php @@ -0,0 +1,124 @@ +google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.Reschedule + */ +class Reschedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + */ + protected $reschedule_type = 0; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schedule_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reschedule_type + * Required. The type of the reschedule. + * @type \Google\Protobuf\Timestamp $schedule_time + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + * @return int + */ + public function getRescheduleType() + { + return $this->reschedule_type; + } + + /** + * Required. The type of the reschedule. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType reschedule_type = 1; + * @param int $var + * @return $this + */ + public function setRescheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody\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](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.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](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 2 [(.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; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reschedule::class, \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody_Reschedule::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php new file mode 100644 index 000000000000..b23869f29abf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRescheduleMaintenanceRequestBody/RescheduleType.php @@ -0,0 +1,68 @@ +google.cloud.sql.v1beta4.SqlInstancesRescheduleMaintenanceRequestBody.RescheduleType + */ +class RescheduleType +{ + /** + * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; + */ + const RESCHEDULE_TYPE_UNSPECIFIED = 0; + /** + * Reschedules maintenance to happen now (within 5 minutes). + * + * Generated from protobuf enum IMMEDIATE = 1; + */ + const IMMEDIATE = 1; + /** + * Reschedules maintenance to occur within one week from the originally + * scheduled day and time. + * + * Generated from protobuf enum NEXT_AVAILABLE_WINDOW = 2; + */ + const NEXT_AVAILABLE_WINDOW = 2; + /** + * Reschedules maintenance to a specific time and day. + * + * 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::NEXT_AVAILABLE_WINDOW => 'NEXT_AVAILABLE_WINDOW', + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RescheduleType::class, \Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody_RescheduleType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetReplicaSizeRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetReplicaSizeRequest.php new file mode 100644 index 000000000000..7e2f114e7e0e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetReplicaSizeRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlInstancesResetReplicaSizeRequest + */ +class SqlInstancesResetReplicaSizeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetSslConfigRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetSslConfigRequest.php new file mode 100644 index 000000000000..7bf3c037979a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesResetSslConfigRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesResetSslConfigRequest + */ +class SqlInstancesResetSslConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestartRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestartRequest.php new file mode 100644 index 000000000000..3f84623964b7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestartRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesRestartRequest + */ +class SqlInstancesRestartRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be restarted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance to be restarted. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestoreBackupRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestoreBackupRequest.php new file mode 100644 index 000000000000..e26e22227997 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRestoreBackupRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesRestoreBackupRequest + */ +class SqlInstancesRestoreBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesRestoreBackupRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesRestoreBackupRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesRestoreBackupRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesRestoreBackupRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesRestoreBackupRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesRestoreBackupRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesRestoreBackupRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRotateServerCaRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRotateServerCaRequest.php new file mode 100644 index 000000000000..66e3901d6b9f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesRotateServerCaRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesRotateServerCaRequest + */ +class SqlInstancesRotateServerCaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesRotateServerCaRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\InstancesRotateServerCaRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesRotateServerCaRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesRotateServerCaRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesRotateServerCaRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesRotateServerCaRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesRotateServerCaRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartExternalSyncRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartExternalSyncRequest.php new file mode 100644 index 000000000000..8653ce62ab18 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartExternalSyncRequest.php @@ -0,0 +1,285 @@ +google.cloud.sql.v1beta4.SqlInstancesStartExternalSyncRequest + */ +class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + */ + protected $sync_mode = 0; + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + */ + protected $skip_verification = false; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sync_parallel_level = 0; + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $migration_type = 0; + protected $sync_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type int $sync_mode + * External sync mode. + * @type bool $skip_verification + * Whether to skip the verification step (VESS). + * @type \Google\Cloud\Sql\V1beta4\MySqlSyncConfig $mysql_sync_config + * MySQL-specific settings for start external sync. + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * @type int $migration_type + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + * @return int + */ + public function getSyncMode() + { + return $this->sync_mode; + } + + /** + * External sync mode. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; + * @param int $var + * @return $this + */ + public function setSyncMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); + $this->sync_mode = $var; + + return $this; + } + + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + * @return bool + */ + public function getSkipVerification() + { + return $this->skip_verification; + } + + /** + * Whether to skip the verification step (VESS). + * + * Generated from protobuf field bool skip_verification = 4; + * @param bool $var + * @return $this + */ + public function setSkipVerification($var) + { + GPBUtil::checkBool($var); + $this->skip_verification = $var; + + return $this; + } + + /** + * MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlSyncConfig mysql_sync_config = 6; + * @return \Google\Cloud\Sql\V1beta4\MySqlSyncConfig|null + */ + public function getMysqlSyncConfig() + { + return $this->readOneof(6); + } + + public function hasMysqlSyncConfig() + { + return $this->hasOneof(6); + } + + /** + * MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlSyncConfig mysql_sync_config = 6; + * @param \Google\Cloud\Sql\V1beta4\MySqlSyncConfig $var + * @return $this + */ + public function setMysqlSyncConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\MySqlSyncConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSyncConfig() + { + return $this->whichOneof("sync_config"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartReplicaRequest.php new file mode 100644 index 000000000000..22f5a280c1a9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStartReplicaRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesStartReplicaRequest + */ +class SqlInstancesStartReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStopReplicaRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStopReplicaRequest.php new file mode 100644 index 000000000000..b26b3e7c4cb5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesStopReplicaRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlInstancesStopReplicaRequest + */ +class SqlInstancesStopReplicaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the read replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesSwitchoverRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesSwitchoverRequest.php new file mode 100644 index 000000000000..43068ffbad44 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesSwitchoverRequest.php @@ -0,0 +1,153 @@ +google.cloud.sql.v1beta4.SqlInstancesSwitchoverRequest + */ +class SqlInstancesSwitchoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the replica. + * @type \Google\Protobuf\Duration $db_timeout + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL read replica instance name. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * ID of the project that contains the replica. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getDbTimeout() + { + return $this->db_timeout; + } + + public function hasDbTimeout() + { + return isset($this->db_timeout); + } + + public function clearDbTimeout() + { + unset($this->db_timeout); + } + + /** + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration db_timeout = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDbTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->db_timeout = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesTruncateLogRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesTruncateLogRequest.php new file mode 100644 index 000000000000..e4f9b017203f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesTruncateLogRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesTruncateLogRequest + */ +class SqlInstancesTruncateLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesTruncateLogRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type \Google\Cloud\Sql\V1beta4\InstancesTruncateLogRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the Cloud SQL project. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesTruncateLogRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesTruncateLogRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesTruncateLogRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesTruncateLogRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesTruncateLogRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesUpdateRequest.php new file mode 100644 index 000000000000..87a28db82b8b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesUpdateRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlInstancesUpdateRequest + */ +class SqlInstancesUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\DatabaseInstance $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + * @return \Google\Cloud\Sql\V1beta4\DatabaseInstance|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.DatabaseInstance body = 100; + * @param \Google\Cloud\Sql\V1beta4\DatabaseInstance $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\DatabaseInstance::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php new file mode 100644 index 000000000000..547295de63ab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php @@ -0,0 +1,319 @@ +google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest + */ +class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + */ + protected $verify_connection_only = false; + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + */ + protected $sync_mode = 0; + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $verify_replication_only = false; + /** + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $migration_type = 0; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sync_parallel_level = 0; + protected $sync_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type bool $verify_connection_only + * Flag to enable verifying connection only + * @type int $sync_mode + * External sync mode + * @type bool $verify_replication_only + * Optional. Flag to verify settings required by replication setup only + * @type \Google\Cloud\Sql\V1beta4\MySqlSyncConfig $mysql_sync_config + * Optional. MySQL-specific settings for start external sync. + * @type int $migration_type + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + * @return bool + */ + public function getVerifyConnectionOnly() + { + return $this->verify_connection_only; + } + + /** + * Flag to enable verifying connection only + * + * Generated from protobuf field bool verify_connection_only = 3; + * @param bool $var + * @return $this + */ + public function setVerifyConnectionOnly($var) + { + GPBUtil::checkBool($var); + $this->verify_connection_only = $var; + + return $this; + } + + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + * @return int + */ + public function getSyncMode() + { + return $this->sync_mode; + } + + /** + * External sync mode + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 4; + * @param int $var + * @return $this + */ + public function setSyncMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode::class); + $this->sync_mode = $var; + + return $this; + } + + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getVerifyReplicationOnly() + { + return $this->verify_replication_only; + } + + /** + * Optional. Flag to verify settings required by replication setup only + * + * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setVerifyReplicationOnly($var) + { + GPBUtil::checkBool($var); + $this->verify_replication_only = $var; + + return $this; + } + + /** + * Optional. MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1beta4\MySqlSyncConfig|null + */ + public function getMysqlSyncConfig() + { + return $this->readOneof(6); + } + + public function hasMysqlSyncConfig() + { + return $this->hasOneof(6); + } + + /** + * Optional. MySQL-specific settings for start external sync. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.MySqlSyncConfig mysql_sync_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1beta4\MySqlSyncConfig $var + * @return $this + */ + public function setMysqlSyncConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\MySqlSyncConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + + /** + * @return string + */ + public function getSyncConfig() + { + return $this->whichOneof("sync_config"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php new file mode 100644 index 000000000000..4e32f72ce78d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/ExternalSyncMode.php @@ -0,0 +1,64 @@ +google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode + */ +class ExternalSyncMode +{ + /** + * Unknown external sync mode, will be defaulted to ONLINE mode + * + * Generated from protobuf enum EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; + */ + const EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; + /** + * Online external sync will set up replication after initial data external + * sync + * + * Generated from protobuf enum ONLINE = 1; + */ + const ONLINE = 1; + /** + * Offline external sync only dumps and loads a one-time snapshot of + * the primary instance's data + * + * Generated from protobuf enum OFFLINE = 2; + */ + const OFFLINE = 2; + + private static $valueToName = [ + self::EXTERNAL_SYNC_MODE_UNSPECIFIED => 'EXTERNAL_SYNC_MODE_UNSPECIFIED', + self::ONLINE => 'ONLINE', + self::OFFLINE => 'OFFLINE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExternalSyncMode::class, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest_ExternalSyncMode::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php new file mode 100644 index 000000000000..d27fd16ff46b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType + */ +class MigrationType +{ + /** + * If no migration type is specified it will be defaulted to LOGICAL. + * + * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0; + */ + const MIGRATION_TYPE_UNSPECIFIED = 0; + /** + * Logical Migrations + * + * Generated from protobuf enum LOGICAL = 1; + */ + const LOGICAL = 1; + /** + * Physical file based Migrations + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED', + self::LOGICAL => 'LOGICAL', + self::PHYSICAL => 'PHYSICAL', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MigrationType::class, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest_MigrationType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsResponse.php new file mode 100644 index 000000000000..1d18c5d4a78a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlInstancesVerifyExternalSyncSettingsResponse.php @@ -0,0 +1,135 @@ +google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsResponse + */ +class SqlInstancesVerifyExternalSyncSettingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlExternalSyncSettingError errors = 2; + */ + private $errors; + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlExternalSyncSettingError warnings = 3; + */ + private $warnings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#migrationSettingErrorList`. + * @type array<\Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $errors + * List of migration violations. + * @type array<\Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $warnings + * List of migration warnings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#migrationSettingErrorList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlExternalSyncSettingError errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * List of migration violations. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlExternalSyncSettingError errors = 2; + * @param array<\Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError::class); + $this->errors = $arr; + + return $this; + } + + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlExternalSyncSettingError warnings = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * List of migration warnings. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SqlExternalSyncSettingError warnings = 3; + * @param array<\Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\SqlExternalSyncSettingError::class); + $this->warnings = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlIpAddressType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlIpAddressType.php new file mode 100644 index 000000000000..fbc0654f24db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlIpAddressType.php @@ -0,0 +1,83 @@ +google.cloud.sql.v1beta4.SqlIpAddressType + */ +class SqlIpAddressType +{ + /** + * This is an unknown IP address type. + * + * Generated from protobuf enum SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; + */ + const SQL_IP_ADDRESS_TYPE_UNSPECIFIED = 0; + /** + * IP address the customer is supposed to connect to. Usually this is the + * load balancer's IP address + * + * Generated from protobuf enum PRIMARY = 1; + */ + const PRIMARY = 1; + /** + * Source IP address of the connection a read replica establishes to its + * external primary instance. This IP address can be allowlisted by the + * customer in case it has a firewall that filters incoming connection to its + * on premises primary instance. + * + * Generated from protobuf enum OUTGOING = 2; + */ + const OUTGOING = 2; + /** + * Private IP used when using private IPs and network peering. + * + * Generated from protobuf enum PRIVATE = 3; + */ + const PBPRIVATE = 3; + /** + * V1 IP of a migrated instance. We want the user to + * decommission this IP as soon as the migration is complete. + * Note: V1 instances with V1 ip addresses will be counted as PRIMARY. + * + * Generated from protobuf enum MIGRATED_1ST_GEN = 4; + */ + const MIGRATED_1ST_GEN = 4; + + private static $valueToName = [ + self::SQL_IP_ADDRESS_TYPE_UNSPECIFIED => 'SQL_IP_ADDRESS_TYPE_UNSPECIFIED', + self::PRIMARY => 'PRIMARY', + self::OUTGOING => 'OUTGOING', + self::PBPRIVATE => 'PRIVATE', + self::MIGRATED_1ST_GEN => 'MIGRATED_1ST_GEN', + ]; + + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsCancelRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsCancelRequest.php new file mode 100644 index 000000000000..478e9556ee10 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsCancelRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlOperationsCancelRequest + */ +class SqlOperationsCancelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsGetRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsGetRequest.php new file mode 100644 index 000000000000..bbc146f67c51 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsGetRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlOperationsGetRequest + */ +class SqlOperationsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + */ + protected $operation = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Instance operation ID. + * + * Generated from protobuf field string operation = 1; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsListRequest.php new file mode 100644 index 000000000000..4378c85f21db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlOperationsListRequest.php @@ -0,0 +1,171 @@ +google.cloud.sql.v1beta4.SqlOperationsListRequest + */ +class SqlOperationsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + */ + protected $max_results = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type int $max_results + * Maximum number of operations per response. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + * @return int + */ + public function getMaxResults() + { + return $this->max_results; + } + + /** + * Maximum number of operations per response. + * + * Generated from protobuf field uint32 max_results = 2; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlPricingPlan.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlPricingPlan.php new file mode 100644 index 000000000000..d501ca946517 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlPricingPlan.php @@ -0,0 +1,61 @@ +google.cloud.sql.v1beta4.SqlPricingPlan + */ +class SqlPricingPlan +{ + /** + * This is an unknown pricing plan for this instance. + * + * Generated from protobuf enum SQL_PRICING_PLAN_UNSPECIFIED = 0; + */ + const SQL_PRICING_PLAN_UNSPECIFIED = 0; + /** + * The instance is billed at a monthly flat rate. + * + * Generated from protobuf enum PACKAGE = 1; + */ + const PACKAGE = 1; + /** + * The instance is billed per usage. + * + * Generated from protobuf enum PER_USE = 2; + */ + const PER_USE = 2; + + private static $valueToName = [ + self::SQL_PRICING_PLAN_UNSPECIFIED => 'SQL_PRICING_PLAN_UNSPECIFIED', + self::PACKAGE => 'PACKAGE', + self::PER_USE => 'PER_USE', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlReplicationType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlReplicationType.php new file mode 100644 index 000000000000..212966a71313 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlReplicationType.php @@ -0,0 +1,63 @@ +google.cloud.sql.v1beta4.SqlReplicationType + */ +class SqlReplicationType +{ + /** + * This is an unknown replication type for a Cloud SQL instance. + * + * Generated from protobuf enum SQL_REPLICATION_TYPE_UNSPECIFIED = 0; + */ + const SQL_REPLICATION_TYPE_UNSPECIFIED = 0; + /** + * The synchronous replication mode for First Generation instances. It is the + * default value. + * + * Generated from protobuf enum SYNCHRONOUS = 1; + */ + const SYNCHRONOUS = 1; + /** + * The asynchronous replication mode for First Generation instances. It + * provides a slight performance gain, but if an outage occurs while this + * option is set to asynchronous, you can lose up to a few seconds of updates + * to your data. + * + * Generated from protobuf enum ASYNCHRONOUS = 2; + */ + const ASYNCHRONOUS = 2; + + private static $valueToName = [ + self::SQL_REPLICATION_TYPE_UNSPECIFIED => 'SQL_REPLICATION_TYPE_UNSPECIFIED', + self::SYNCHRONOUS => 'SYNCHRONOUS', + self::ASYNCHRONOUS => 'ASYNCHRONOUS', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerAuditConfig.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerAuditConfig.php new file mode 100644 index 000000000000..5137079eaf59 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerAuditConfig.php @@ -0,0 +1,189 @@ +google.cloud.sql.v1beta4.SqlServerAuditConfig + */ +class SqlServerAuditConfig extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + */ + protected $bucket = ''; + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + */ + protected $retention_interval = null; + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + */ + protected $upload_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#sqlServerAuditConfig + * @type string $bucket + * The name of the destination bucket (e.g., gs://mybucket). + * @type \Google\Protobuf\Duration $retention_interval + * How long to keep generated audit files. + * @type \Google\Protobuf\Duration $upload_interval + * How often to upload generated audit files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#sqlServerAuditConfig + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * The name of the destination bucket (e.g., gs://mybucket). + * + * Generated from protobuf field string bucket = 2; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionInterval() + { + return $this->retention_interval; + } + + public function hasRetentionInterval() + { + return isset($this->retention_interval); + } + + public function clearRetentionInterval() + { + unset($this->retention_interval); + } + + /** + * How long to keep generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration retention_interval = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_interval = $var; + + return $this; + } + + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getUploadInterval() + { + return $this->upload_interval; + } + + public function hasUploadInterval() + { + return isset($this->upload_interval); + } + + public function clearUploadInterval() + { + unset($this->upload_interval); + } + + /** + * How often to upload generated audit files. + * + * Generated from protobuf field .google.protobuf.Duration upload_interval = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setUploadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->upload_interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerDatabaseDetails.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerDatabaseDetails.php new file mode 100644 index 000000000000..13de780c5c55 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerDatabaseDetails.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlServerDatabaseDetails + */ +class SqlServerDatabaseDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + */ + protected $compatibility_level = 0; + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + */ + protected $recovery_model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $compatibility_level + * The version of SQL Server with which the database is to be made compatible + * @type string $recovery_model + * The recovery model of a SQL Server database + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + * @return int + */ + public function getCompatibilityLevel() + { + return $this->compatibility_level; + } + + /** + * The version of SQL Server with which the database is to be made compatible + * + * Generated from protobuf field int32 compatibility_level = 1; + * @param int $var + * @return $this + */ + public function setCompatibilityLevel($var) + { + GPBUtil::checkInt32($var); + $this->compatibility_level = $var; + + return $this; + } + + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + * @return string + */ + public function getRecoveryModel() + { + return $this->recovery_model; + } + + /** + * The recovery model of a SQL Server database + * + * Generated from protobuf field string recovery_model = 2; + * @param string $var + * @return $this + */ + public function setRecoveryModel($var) + { + GPBUtil::checkString($var, True); + $this->recovery_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerUserDetails.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerUserDetails.php new file mode 100644 index 000000000000..e45e0920c982 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlServerUserDetails.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SqlServerUserDetails + */ +class SqlServerUserDetails extends \Google\Protobuf\Internal\Message +{ + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + */ + protected $disabled = false; + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + */ + private $server_roles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $disabled + * If the user has been disabled + * @type array|\Google\Protobuf\Internal\RepeatedField $server_roles + * The server roles for this user + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * If the user has been disabled + * + * Generated from protobuf field bool disabled = 1; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerRoles() + { + return $this->server_roles; + } + + /** + * The server roles for this user + * + * Generated from protobuf field repeated string server_roles = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerRoles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->server_roles = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsDeleteRequest.php new file mode 100644 index 000000000000..c739696d0f4f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsDeleteRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1beta4.SqlSslCertsDeleteRequest + */ +class SqlSslCertsDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + */ + protected $sha1_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1_fingerprint + * Sha1 FingerPrint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsGetRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsGetRequest.php new file mode 100644 index 000000000000..3f87490d835e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsGetRequest.php @@ -0,0 +1,133 @@ +google.cloud.sql.v1beta4.SqlSslCertsGetRequest + */ +class SqlSslCertsGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + */ + protected $sha1_fingerprint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1_fingerprint + * Sha1 FingerPrint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 FingerPrint. + * + * Generated from protobuf field string sha1_fingerprint = 3; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsInsertRequest.php new file mode 100644 index 000000000000..5c6f004a1509 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlSslCertsInsertRequest + */ +class SqlSslCertsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertsInsertRequest body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\SslCertsInsertRequest $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertsInsertRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\SslCertsInsertRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertsInsertRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\SslCertsInsertRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCertsInsertRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsListRequest.php new file mode 100644 index 000000000000..c35899607a1c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSslCertsListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlSslCertsListRequest + */ +class SqlSslCertsListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Cloud SQL instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSuspensionReason.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSuspensionReason.php new file mode 100644 index 000000000000..d36130e77c0c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlSuspensionReason.php @@ -0,0 +1,78 @@ +google.cloud.sql.v1beta4.SqlSuspensionReason + */ +class SqlSuspensionReason +{ + /** + * This is an unknown suspension reason. + * + * Generated from protobuf enum SQL_SUSPENSION_REASON_UNSPECIFIED = 0; + */ + const SQL_SUSPENSION_REASON_UNSPECIFIED = 0; + /** + * The instance is suspended due to billing issues (for example:, GCP account + * issue) + * + * Generated from protobuf enum BILLING_ISSUE = 2; + */ + const BILLING_ISSUE = 2; + /** + * The instance is suspended due to illegal content (for example:, child + * pornography, copyrighted material, etc.). + * + * Generated from protobuf enum LEGAL_ISSUE = 3; + */ + const LEGAL_ISSUE = 3; + /** + * The instance is causing operational issues (for example:, causing the + * database to crash). + * + * Generated from protobuf enum OPERATIONAL_ISSUE = 4; + */ + const OPERATIONAL_ISSUE = 4; + /** + * The KMS key used by the instance is either revoked or denied access to + * + * Generated from protobuf enum KMS_KEY_ISSUE = 5; + */ + const KMS_KEY_ISSUE = 5; + + private static $valueToName = [ + self::SQL_SUSPENSION_REASON_UNSPECIFIED => 'SQL_SUSPENSION_REASON_UNSPECIFIED', + self::BILLING_ISSUE => 'BILLING_ISSUE', + self::LEGAL_ISSUE => 'LEGAL_ISSUE', + self::OPERATIONAL_ISSUE => 'OPERATIONAL_ISSUE', + self::KMS_KEY_ISSUE => 'KMS_KEY_ISSUE', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlTiersListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlTiersListRequest.php new file mode 100644 index 000000000000..02515e9a188e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlTiersListRequest.php @@ -0,0 +1,65 @@ +google.cloud.sql.v1beta4.SqlTiersListRequest + */ +class SqlTiersListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID of the project for which to list tiers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project for which to list tiers. + * + * Generated from protobuf field string project = 1; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUpdateTrack.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUpdateTrack.php new file mode 100644 index 000000000000..13b3da808cc6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUpdateTrack.php @@ -0,0 +1,73 @@ +google.cloud.sql.v1beta4.SqlUpdateTrack + */ +class SqlUpdateTrack +{ + /** + * This is an unknown maintenance timing preference. + * + * Generated from protobuf enum SQL_UPDATE_TRACK_UNSPECIFIED = 0; + */ + const SQL_UPDATE_TRACK_UNSPECIFIED = 0; + /** + * For instance update that requires a restart, this update track indicates + * your instance prefer to restart for new version early in maintenance + * window. + * + * Generated from protobuf enum canary = 1; + */ + const canary = 1; + /** + * For instance update that requires a restart, this update track indicates + * your instance prefer to let Cloud SQL choose the timing of restart (within + * its Maintenance window, if applicable). + * + * Generated from protobuf enum stable = 2; + */ + const stable = 2; + /** + * For instance update that requires a restart, this update track indicates + * your instance prefer to let Cloud SQL choose the timing of restart (within + * its Maintenance window, if applicable) to be at least 5 weeks after the + * notification. + * + * Generated from protobuf enum week5 = 3; + */ + const week5 = 3; + + private static $valueToName = [ + self::SQL_UPDATE_TRACK_UNSPECIFIED => 'SQL_UPDATE_TRACK_UNSPECIFIED', + self::canary => 'canary', + self::stable => 'stable', + self::week5 => 'week5', + ]; + + 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/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersDeleteRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersDeleteRequest.php new file mode 100644 index 000000000000..656f740f4cab --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersDeleteRequest.php @@ -0,0 +1,167 @@ +google.cloud.sql.v1beta4.SqlUsersDeleteRequest + */ +class SqlUsersDeleteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + */ + protected $host = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Host of the user in the instance. + * + * Generated from protobuf field string host = 1; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersGetRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersGetRequest.php new file mode 100644 index 000000000000..d40818f65842 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersGetRequest.php @@ -0,0 +1,169 @@ +google.cloud.sql.v1beta4.SqlUsersGetRequest + */ +class SqlUsersGetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + */ + protected $project = ''; + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + */ + protected $host = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * User of the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $host + * Host of a user of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * User of the instance. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 3; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Host of a user of the instance. + * + * Generated from protobuf field string host = 4; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersInsertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersInsertRequest.php new file mode 100644 index 000000000000..ba22d08a450a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersInsertRequest.php @@ -0,0 +1,136 @@ +google.cloud.sql.v1beta4.SqlUsersInsertRequest + */ +class SqlUsersInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.User body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\User $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.User body = 100; + * @return \Google\Cloud\Sql\V1beta4\User|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.User body = 100; + * @param \Google\Cloud\Sql\V1beta4\User $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\User::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersListRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersListRequest.php new file mode 100644 index 000000000000..edd4f205cdaf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersListRequest.php @@ -0,0 +1,99 @@ +google.cloud.sql.v1beta4.SqlUsersListRequest + */ +class SqlUsersListRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + */ + protected $instance = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + */ + protected $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 1; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 2; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersUpdateRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersUpdateRequest.php new file mode 100644 index 000000000000..c78e920538dd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SqlUsersUpdateRequest.php @@ -0,0 +1,204 @@ +google.cloud.sql.v1beta4.SqlUsersUpdateRequest + */ +class SqlUsersUpdateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $host = ''; + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + */ + protected $project = ''; + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.User body = 100; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host + * Optional. Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type \Google\Cloud\Sql\V1beta4\User $body + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Optional. Host of the user in the instance. + * + * Generated from protobuf field string host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Database instance ID. This does not include the project ID. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the user in the instance. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID of the project that contains the instance. + * + * Generated from protobuf field string project = 4; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.User body = 100; + * @return \Google\Cloud\Sql\V1beta4\User|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.User body = 100; + * @param \Google\Cloud\Sql\V1beta4\User $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\User::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCert.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCert.php new file mode 100644 index 000000000000..676289385726 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCert.php @@ -0,0 +1,375 @@ +google.cloud.sql.v1beta4.SslCert + */ +class SslCert extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + */ + protected $cert_serial_number = ''; + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + */ + protected $cert = ''; + /** + * The time when the certificate was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + */ + protected $common_name = ''; + /** + * The time when the certificate expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + */ + protected $expiration_time = null; + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + */ + protected $sha1_fingerprint = ''; + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + */ + protected $instance = ''; + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + */ + protected $self_link = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCert`. + * @type string $cert_serial_number + * Serial number, as extracted from the certificate. + * @type string $cert + * PEM representation. + * @type \Google\Protobuf\Timestamp $create_time + * The time when the certificate was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $common_name + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * @type \Google\Protobuf\Timestamp $expiration_time + * The time when the certificate expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * @type string $sha1_fingerprint + * Sha1 Fingerprint. + * @type string $instance + * Name of the database instance. + * @type string $self_link + * The URI of this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCert`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + * @return string + */ + public function getCertSerialNumber() + { + return $this->cert_serial_number; + } + + /** + * Serial number, as extracted from the certificate. + * + * Generated from protobuf field string cert_serial_number = 2; + * @param string $var + * @return $this + */ + public function setCertSerialNumber($var) + { + GPBUtil::checkString($var, True); + $this->cert_serial_number = $var; + + return $this; + } + + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + * @return string + */ + public function getCert() + { + return $this->cert; + } + + /** + * PEM representation. + * + * Generated from protobuf field string cert = 3; + * @param string $var + * @return $this + */ + public function setCert($var) + { + GPBUtil::checkString($var, True); + $this->cert = $var; + + return $this; + } + + /** + * The time when the certificate was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @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); + } + + /** + * The time when the certificate was created in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + * @return string + */ + public function getCommonName() + { + return $this->common_name; + } + + /** + * User supplied name. Constrained to [a-zA-Z.-_ ]+. + * + * Generated from protobuf field string common_name = 5; + * @param string $var + * @return $this + */ + public function setCommonName($var) + { + GPBUtil::checkString($var, True); + $this->common_name = $var; + + return $this; + } + + /** + * The time when the certificate expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * The time when the certificate expires in + * [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example + * `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + * @return string + */ + public function getSha1Fingerprint() + { + return $this->sha1_fingerprint; + } + + /** + * Sha1 Fingerprint. + * + * Generated from protobuf field string sha1_fingerprint = 7; + * @param string $var + * @return $this + */ + public function setSha1Fingerprint($var) + { + GPBUtil::checkString($var, True); + $this->sha1_fingerprint = $var; + + return $this; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Name of the database instance. + * + * Generated from protobuf field string instance = 8; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * The URI of this resource. + * + * Generated from protobuf field string self_link = 9; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertDetail.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertDetail.php new file mode 100644 index 000000000000..dc808ee307e5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertDetail.php @@ -0,0 +1,115 @@ +google.cloud.sql.v1beta4.SslCertDetail + */ +class SslCertDetail extends \Google\Protobuf\Internal\Message +{ + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert cert_info = 1; + */ + protected $cert_info = null; + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + */ + protected $cert_private_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\SslCert $cert_info + * The public information about the cert. + * @type string $cert_private_key + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert cert_info = 1; + * @return \Google\Cloud\Sql\V1beta4\SslCert|null + */ + public function getCertInfo() + { + return $this->cert_info; + } + + public function hasCertInfo() + { + return isset($this->cert_info); + } + + public function clearCertInfo() + { + unset($this->cert_info); + } + + /** + * The public information about the cert. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert cert_info = 1; + * @param \Google\Cloud\Sql\V1beta4\SslCert $var + * @return $this + */ + public function setCertInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->cert_info = $var; + + return $this; + } + + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + * @return string + */ + public function getCertPrivateKey() + { + return $this->cert_private_key; + } + + /** + * The private key for the client cert, in pem format. Keep private in order + * to protect your security. + * + * Generated from protobuf field string cert_private_key = 2; + * @param string $var + * @return $this + */ + public function setCertPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->cert_private_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsCreateEphemeralRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsCreateEphemeralRequest.php new file mode 100644 index 000000000000..17b131faedbc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsCreateEphemeralRequest.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SslCertsCreateEphemeralRequest + */ +class SslCertsCreateEphemeralRequest extends \Google\Protobuf\Internal\Message +{ + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + */ + protected $public_key = ''; + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + */ + protected $access_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $public_key + * PEM encoded public key to include in the signed certificate. + * @type string $access_token + * Access token to include in the signed certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + * @return string + */ + public function getPublicKey() + { + return $this->public_key; + } + + /** + * PEM encoded public key to include in the signed certificate. + * + * Generated from protobuf field string public_key = 1; + * @param string $var + * @return $this + */ + public function setPublicKey($var) + { + GPBUtil::checkString($var, True); + $this->public_key = $var; + + return $this; + } + + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * Access token to include in the signed certificate. + * + * Generated from protobuf field string access_token = 2; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertRequest.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertRequest.php new file mode 100644 index 000000000000..60070142f0ec --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertRequest.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1beta4.SslCertsInsertRequest + */ +class SslCertsInsertRequest extends \Google\Protobuf\Internal\Message +{ + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + */ + protected $common_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $common_name + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + * @return string + */ + public function getCommonName() + { + return $this->common_name; + } + + /** + * User supplied name. Must be a distinct name from the other certificates + * for this instance. + * + * Generated from protobuf field string common_name = 1; + * @param string $var + * @return $this + */ + public function setCommonName($var) + { + GPBUtil::checkString($var, True); + $this->common_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertResponse.php new file mode 100644 index 000000000000..bed903dd6b96 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsInsertResponse.php @@ -0,0 +1,207 @@ +google.cloud.sql.v1beta4.SslCertsInsertResponse + */ +class SslCertsInsertResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation operation = 2; + */ + protected $operation = null; + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 3; + */ + protected $server_ca_cert = null; + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertDetail client_cert = 4; + */ + protected $client_cert = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCertsInsert`. + * @type \Google\Cloud\Sql\V1beta4\Operation $operation + * The operation to track the ssl certs insert request. + * @type \Google\Cloud\Sql\V1beta4\SslCert $server_ca_cert + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * @type \Google\Cloud\Sql\V1beta4\SslCertDetail $client_cert + * The new client certificate and private key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCertsInsert`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation operation = 2; + * @return \Google\Cloud\Sql\V1beta4\Operation|null + */ + public function getOperation() + { + return $this->operation; + } + + public function hasOperation() + { + return isset($this->operation); + } + + public function clearOperation() + { + unset($this->operation); + } + + /** + * The operation to track the ssl certs insert request. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.Operation operation = 2; + * @param \Google\Cloud\Sql\V1beta4\Operation $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\Operation::class); + $this->operation = $var; + + return $this; + } + + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 3; + * @return \Google\Cloud\Sql\V1beta4\SslCert|null + */ + public function getServerCaCert() + { + return $this->server_ca_cert; + } + + public function hasServerCaCert() + { + return isset($this->server_ca_cert); + } + + public function clearServerCaCert() + { + unset($this->server_ca_cert); + } + + /** + * The server Certificate Authority's certificate. If this is missing you can + * force a new one to be generated by calling resetSslConfig method on + * instances resource. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCert server_ca_cert = 3; + * @param \Google\Cloud\Sql\V1beta4\SslCert $var + * @return $this + */ + public function setServerCaCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->server_ca_cert = $var; + + return $this; + } + + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertDetail client_cert = 4; + * @return \Google\Cloud\Sql\V1beta4\SslCertDetail|null + */ + public function getClientCert() + { + return $this->client_cert; + } + + public function hasClientCert() + { + return isset($this->client_cert); + } + + public function clearClientCert() + { + unset($this->client_cert); + } + + /** + * The new client certificate and private key. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SslCertDetail client_cert = 4; + * @param \Google\Cloud\Sql\V1beta4\SslCertDetail $var + * @return $this + */ + public function setClientCert($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SslCertDetail::class); + $this->client_cert = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsListResponse.php new file mode 100644 index 000000000000..7fc7ca00d33d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SslCertsListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.SslCertsListResponse + */ +class SslCertsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SslCert items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#sslCertsList`. + * @type array<\Google\Cloud\Sql\V1beta4\SslCert>|\Google\Protobuf\Internal\RepeatedField $items + * List of client certificates for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#sslCertsList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SslCert items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of client certificates for the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.SslCert items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\SslCert>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\SslCert::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SyncFlags.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SyncFlags.php new file mode 100644 index 000000000000..da6be916319b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/SyncFlags.php @@ -0,0 +1,106 @@ +google.cloud.sql.v1beta4.SyncFlags + */ +class SyncFlags extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the flag. + * @type string $value + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the flag. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the flag. This field must be omitted if the flag + * doesn't take a value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Tier.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Tier.php new file mode 100644 index 000000000000..fd61cda545d3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/Tier.php @@ -0,0 +1,207 @@ +google.cloud.sql.v1beta4.Tier + */ +class Tier extends \Google\Protobuf\Internal\Message +{ + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + */ + protected $tier = ''; + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + */ + protected $RAM = 0; + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + */ + protected $kind = ''; + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + */ + protected $Disk_Quota = 0; + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + */ + private $region; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tier + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * @type int|string $RAM + * The maximum RAM usage of this tier in bytes. + * @type string $kind + * This is always `sql#tier`. + * @type int|string $Disk_Quota + * The maximum disk size of this tier in bytes. + * @type array|\Google\Protobuf\Internal\RepeatedField $region + * The applicable regions for this tier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + * @return string + */ + public function getTier() + { + return $this->tier; + } + + /** + * An identifier for the machine type, for example, `db-custom-1-3840`. For + * related information, see [Pricing](/sql/pricing). + * + * Generated from protobuf field string tier = 1; + * @param string $var + * @return $this + */ + public function setTier($var) + { + GPBUtil::checkString($var, True); + $this->tier = $var; + + return $this; + } + + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + * @return int|string + */ + public function getRAM() + { + return $this->RAM; + } + + /** + * The maximum RAM usage of this tier in bytes. + * + * Generated from protobuf field int64 RAM = 2; + * @param int|string $var + * @return $this + */ + public function setRAM($var) + { + GPBUtil::checkInt64($var); + $this->RAM = $var; + + return $this; + } + + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#tier`. + * + * Generated from protobuf field string kind = 3; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + * @return int|string + */ + public function getDiskQuota() + { + return $this->Disk_Quota; + } + + /** + * The maximum disk size of this tier in bytes. + * + * Generated from protobuf field int64 Disk_Quota = 4; + * @param int|string $var + * @return $this + */ + public function setDiskQuota($var) + { + GPBUtil::checkInt64($var); + $this->Disk_Quota = $var; + + return $this; + } + + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegion() + { + return $this->region; + } + + /** + * The applicable regions for this tier. + * + * Generated from protobuf field repeated string region = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->region = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TiersListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TiersListResponse.php new file mode 100644 index 000000000000..91c45234a820 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TiersListResponse.php @@ -0,0 +1,101 @@ +google.cloud.sql.v1beta4.TiersListResponse + */ +class TiersListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Tier items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#tiersList`. + * @type array<\Google\Cloud\Sql\V1beta4\Tier>|\Google\Protobuf\Internal\RepeatedField $items + * List of tiers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlTiers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#tiersList`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Tier items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of tiers. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.Tier items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\Tier>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\Tier::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TruncateLogContext.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TruncateLogContext.php new file mode 100644 index 000000000000..3268b1d8c1c8 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/TruncateLogContext.php @@ -0,0 +1,105 @@ +google.cloud.sql.v1beta4.TruncateLogContext + */ +class TruncateLogContext extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + */ + protected $log_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#truncateLogContext`. + * @type string $log_type + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#truncateLogContext`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + * @return string + */ + public function getLogType() + { + return $this->log_type; + } + + /** + * The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and + * `MYSQL_SLOW_TABLE`. + * + * Generated from protobuf field string log_type = 2; + * @param string $var + * @return $this + */ + public function setLogType($var) + { + GPBUtil::checkString($var, True); + $this->log_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User.php new file mode 100644 index 000000000000..72ff24f41d27 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User.php @@ -0,0 +1,474 @@ +google.cloud.sql.v1beta4.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $host = ''; + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for update because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + */ + protected $instance = ''; + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for + * update because it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + */ + protected $project = ''; + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.User.SqlUserType type = 8; + */ + protected $type = 0; + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.UserPasswordValidationPolicy password_policy = 12; + */ + protected $password_policy = null; + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.User.DualPasswordType dual_password_type = 13; + */ + protected $dual_password_type = null; + protected $user_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always `sql#user`. + * @type string $password + * The password for the user. + * @type string $etag + * This field is deprecated and will be removed from a future version of the + * API. + * @type string $name + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * @type string $host + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * @type string $instance + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for update because it is already specified on the + * URL. + * @type string $project + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for + * update because it is already specified on the URL. + * @type int $type + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * @type \Google\Cloud\Sql\V1beta4\SqlServerUserDetails $sqlserver_user_details + * @type \Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy $password_policy + * User level password validation policy. + * @type int $dual_password_type + * Dual password status for the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always `sql#user`. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password for the user. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This field is deprecated and will be removed from a future version of the + * API. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the user in the Cloud SQL instance. Can be omitted for + * `update` because it is already specified in the URL. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Optional. The host from which the user can connect. For `insert` + * operations, host defaults to an empty string. For `update` + * operations, host is specified as part of the request URL. The host name + * cannot be updated after insertion. For a MySQL instance, it's required; + * for a PostgreSQL or SQL Server instance, it's optional. + * + * Generated from protobuf field string host = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for update because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The name of the Cloud SQL instance. This does not include the project ID. + * Can be omitted for update because it is already specified on the + * URL. + * + * Generated from protobuf field string instance = 6; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for + * update because it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * The project ID of the project containing the Cloud SQL database. The Google + * apps domain is prefixed if applicable. Can be omitted for + * update because it is already specified on the URL. + * + * Generated from protobuf field string project = 7; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.User.SqlUserType type = 8; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The user type. It determines the method to authenticate the user during + * login. The default is the database's built-in user type. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.User.SqlUserType type = 8; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\User\SqlUserType::class); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerUserDetails sqlserver_user_details = 9; + * @return \Google\Cloud\Sql\V1beta4\SqlServerUserDetails|null + */ + public function getSqlserverUserDetails() + { + return $this->readOneof(9); + } + + public function hasSqlserverUserDetails() + { + return $this->hasOneof(9); + } + + /** + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlServerUserDetails sqlserver_user_details = 9; + * @param \Google\Cloud\Sql\V1beta4\SqlServerUserDetails $var + * @return $this + */ + public function setSqlserverUserDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\SqlServerUserDetails::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.UserPasswordValidationPolicy password_policy = 12; + * @return \Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy|null + */ + public function getPasswordPolicy() + { + return $this->password_policy; + } + + public function hasPasswordPolicy() + { + return isset($this->password_policy); + } + + public function clearPasswordPolicy() + { + unset($this->password_policy); + } + + /** + * User level password validation policy. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.UserPasswordValidationPolicy password_policy = 12; + * @param \Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy $var + * @return $this + */ + public function setPasswordPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\UserPasswordValidationPolicy::class); + $this->password_policy = $var; + + return $this; + } + + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.User.DualPasswordType dual_password_type = 13; + * @return int + */ + public function getDualPasswordType() + { + return isset($this->dual_password_type) ? $this->dual_password_type : 0; + } + + public function hasDualPasswordType() + { + return isset($this->dual_password_type); + } + + public function clearDualPasswordType() + { + unset($this->dual_password_type); + } + + /** + * Dual password status for the user. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.User.DualPasswordType dual_password_type = 13; + * @param int $var + * @return $this + */ + public function setDualPasswordType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\User\DualPasswordType::class); + $this->dual_password_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getUserDetails() + { + return $this->whichOneof("user_details"); + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/DualPasswordType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/DualPasswordType.php new file mode 100644 index 000000000000..4a17aba1b666 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/DualPasswordType.php @@ -0,0 +1,71 @@ +google.cloud.sql.v1beta4.User.DualPasswordType + */ +class DualPasswordType +{ + /** + * The default value. + * + * Generated from protobuf enum DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; + */ + const DUAL_PASSWORD_TYPE_UNSPECIFIED = 0; + /** + * Do not update the user's dual password status. + * + * Generated from protobuf enum NO_MODIFY_DUAL_PASSWORD = 1; + */ + const NO_MODIFY_DUAL_PASSWORD = 1; + /** + * No dual password usable for connecting using this user. + * + * Generated from protobuf enum NO_DUAL_PASSWORD = 2; + */ + const NO_DUAL_PASSWORD = 2; + /** + * Dual password usable for connecting using this user. + * + * Generated from protobuf enum DUAL_PASSWORD = 3; + */ + const DUAL_PASSWORD = 3; + + private static $valueToName = [ + self::DUAL_PASSWORD_TYPE_UNSPECIFIED => 'DUAL_PASSWORD_TYPE_UNSPECIFIED', + self::NO_MODIFY_DUAL_PASSWORD => 'NO_MODIFY_DUAL_PASSWORD', + self::NO_DUAL_PASSWORD => 'NO_DUAL_PASSWORD', + self::DUAL_PASSWORD => 'DUAL_PASSWORD', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DualPasswordType::class, \Google\Cloud\Sql\V1beta4\User_DualPasswordType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/SqlUserType.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/SqlUserType.php new file mode 100644 index 000000000000..b2077418b810 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/User/SqlUserType.php @@ -0,0 +1,85 @@ +google.cloud.sql.v1beta4.User.SqlUserType + */ +class SqlUserType +{ + /** + * The database's built-in user type. + * + * Generated from protobuf enum BUILT_IN = 0; + */ + const BUILT_IN = 0; + /** + * Cloud IAM user. + * + * Generated from protobuf enum CLOUD_IAM_USER = 1; + */ + const CLOUD_IAM_USER = 1; + /** + * Cloud IAM service account. + * + * Generated from protobuf enum CLOUD_IAM_SERVICE_ACCOUNT = 2; + */ + const CLOUD_IAM_SERVICE_ACCOUNT = 2; + /** + * Cloud IAM group non-login user. + * + * Generated from protobuf enum CLOUD_IAM_GROUP = 3; + */ + const CLOUD_IAM_GROUP = 3; + /** + * Cloud IAM group login user. + * + * Generated from protobuf enum CLOUD_IAM_GROUP_USER = 4; + */ + const CLOUD_IAM_GROUP_USER = 4; + /** + * Cloud IAM group service account. + * + * Generated from protobuf enum CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; + */ + const CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5; + + private static $valueToName = [ + self::BUILT_IN => 'BUILT_IN', + self::CLOUD_IAM_USER => 'CLOUD_IAM_USER', + self::CLOUD_IAM_SERVICE_ACCOUNT => 'CLOUD_IAM_SERVICE_ACCOUNT', + self::CLOUD_IAM_GROUP => 'CLOUD_IAM_GROUP', + self::CLOUD_IAM_GROUP_USER => 'CLOUD_IAM_GROUP_USER', + self::CLOUD_IAM_GROUP_SERVICE_ACCOUNT => 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlUserType::class, \Google\Cloud\Sql\V1beta4\User_SqlUserType::class); + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UserPasswordValidationPolicy.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UserPasswordValidationPolicy.php new file mode 100644 index 000000000000..345fa09f5272 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UserPasswordValidationPolicy.php @@ -0,0 +1,227 @@ +google.cloud.sql.v1beta4.UserPasswordValidationPolicy + */ +class UserPasswordValidationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + */ + protected $allowed_failed_attempts = 0; + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + */ + protected $password_expiration_duration = null; + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + */ + protected $enable_failed_attempts_check = false; + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + */ + protected $enable_password_verification = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $allowed_failed_attempts + * Number of failed login attempts allowed before user get locked. + * @type \Google\Protobuf\Duration $password_expiration_duration + * Expiration duration after password is updated. + * @type bool $enable_failed_attempts_check + * If true, failed login attempts check will be enabled. + * @type \Google\Cloud\Sql\V1beta4\PasswordStatus $status + * Output only. Read-only password status. + * @type bool $enable_password_verification + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + * @return int + */ + public function getAllowedFailedAttempts() + { + return $this->allowed_failed_attempts; + } + + /** + * Number of failed login attempts allowed before user get locked. + * + * Generated from protobuf field int32 allowed_failed_attempts = 1; + * @param int $var + * @return $this + */ + public function setAllowedFailedAttempts($var) + { + GPBUtil::checkInt32($var); + $this->allowed_failed_attempts = $var; + + return $this; + } + + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getPasswordExpirationDuration() + { + return $this->password_expiration_duration; + } + + public function hasPasswordExpirationDuration() + { + return isset($this->password_expiration_duration); + } + + public function clearPasswordExpirationDuration() + { + unset($this->password_expiration_duration); + } + + /** + * Expiration duration after password is updated. + * + * Generated from protobuf field .google.protobuf.Duration password_expiration_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPasswordExpirationDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->password_expiration_duration = $var; + + return $this; + } + + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + * @return bool + */ + public function getEnableFailedAttemptsCheck() + { + return $this->enable_failed_attempts_check; + } + + /** + * If true, failed login attempts check will be enabled. + * + * Generated from protobuf field bool enable_failed_attempts_check = 3; + * @param bool $var + * @return $this + */ + public function setEnableFailedAttemptsCheck($var) + { + GPBUtil::checkBool($var); + $this->enable_failed_attempts_check = $var; + + return $this; + } + + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Sql\V1beta4\PasswordStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Read-only password status. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.PasswordStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Sql\V1beta4\PasswordStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\PasswordStatus::class); + $this->status = $var; + + return $this; + } + + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + * @return bool + */ + public function getEnablePasswordVerification() + { + return $this->enable_password_verification; + } + + /** + * If true, the user must specify the current password before changing the + * password. This flag is supported only for MySQL. + * + * Generated from protobuf field bool enable_password_verification = 5; + * @param bool $var + * @return $this + */ + public function setEnablePasswordVerification($var) + { + GPBUtil::checkBool($var); + $this->enable_password_verification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UsersListResponse.php b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UsersListResponse.php new file mode 100644 index 000000000000..35e948c4481e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/proto/src/Google/Cloud/Sql/V1beta4/UsersListResponse.php @@ -0,0 +1,140 @@ +google.cloud.sql.v1beta4.UsersListResponse + */ +class UsersListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * This is always sql#usersList. + * + * Generated from protobuf field string kind = 1; + */ + protected $kind = ''; + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.User items = 2; + */ + private $items; + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @deprecated + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kind + * This is always sql#usersList. + * @type array<\Google\Cloud\Sql\V1beta4\User>|\Google\Protobuf\Internal\RepeatedField $items + * List of user resources in the instance. + * @type string $next_page_token + * Unused. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlUsers::initOnce(); + parent::__construct($data); + } + + /** + * This is always sql#usersList. + * + * Generated from protobuf field string kind = 1; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * This is always sql#usersList. + * + * Generated from protobuf field string kind = 1; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.User items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of user resources in the instance. + * + * Generated from protobuf field repeated .google.cloud.sql.v1beta4.User items = 2; + * @param array<\Google\Cloud\Sql\V1beta4\User>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\User::class); + $this->items = $arr; + + return $this; + } + + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @return string + * @deprecated + */ + public function getNextPageToken() + { + @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); + return $this->next_page_token; + } + + /** + * Unused. + * + * Generated from protobuf field string next_page_token = 3 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setNextPageToken($var) + { + @trigger_error('next_page_token is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/delete.php new file mode 100644 index 000000000000..2e5212342ebd --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/delete.php @@ -0,0 +1,53 @@ +delete(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlBackupRunsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/get.php new file mode 100644 index 000000000000..e11f11527db0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/get.php @@ -0,0 +1,53 @@ +get(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlBackupRunsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/insert.php new file mode 100644 index 000000000000..5b3749daa296 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/insert.php @@ -0,0 +1,53 @@ +insert(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlBackupRunsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/list.php new file mode 100644 index 000000000000..b94f03d7a1e6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlBackupRunsServiceClient/list.php @@ -0,0 +1,55 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlBackupRunsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/generate_ephemeral_cert.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/generate_ephemeral_cert.php new file mode 100644 index 000000000000..1c2b5ffea8e2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/generate_ephemeral_cert.php @@ -0,0 +1,56 @@ +generateEphemeralCert(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlConnectService_GenerateEphemeralCert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/get_connect_settings.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/get_connect_settings.php new file mode 100644 index 000000000000..a295b9054e2f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlConnectServiceClient/get_connect_settings.php @@ -0,0 +1,53 @@ +getConnectSettings(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlConnectService_GetConnectSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/delete.php new file mode 100644 index 000000000000..57b5432d0eb1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/delete.php @@ -0,0 +1,53 @@ +delete(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlDatabasesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/get.php new file mode 100644 index 000000000000..3dcd347cf1fb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/get.php @@ -0,0 +1,54 @@ +get(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlDatabasesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/insert.php new file mode 100644 index 000000000000..5dbbb08f7459 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/insert.php @@ -0,0 +1,56 @@ +insert(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlDatabasesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/list.php new file mode 100644 index 000000000000..cd77fa332702 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/list.php @@ -0,0 +1,53 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlDatabasesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/patch.php new file mode 100644 index 000000000000..8380f879550e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/patch.php @@ -0,0 +1,54 @@ +patch(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlDatabasesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/update.php new file mode 100644 index 000000000000..b4ec40eb1190 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlDatabasesServiceClient/update.php @@ -0,0 +1,54 @@ +update(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlDatabasesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlFlagsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlFlagsServiceClient/list.php new file mode 100644 index 000000000000..5cf2d1e4acc3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlFlagsServiceClient/list.php @@ -0,0 +1,53 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlFlagsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php new file mode 100644 index 000000000000..e64643a2bbdb --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php @@ -0,0 +1,71 @@ +acquireSsrsLease($instance, $project); + 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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + acquire_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_AcquireSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/add_server_ca.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/add_server_ca.php new file mode 100644 index 000000000000..9a3039836b57 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/add_server_ca.php @@ -0,0 +1,57 @@ +addServerCa(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_AddServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/clone.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/clone.php new file mode 100644 index 000000000000..4f83000eea53 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/clone.php @@ -0,0 +1,54 @@ +clone(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Clone_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/create_ephemeral.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/create_ephemeral.php new file mode 100644 index 000000000000..ffae4d7dabfa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/create_ephemeral.php @@ -0,0 +1,56 @@ +createEphemeral(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_CreateEphemeral_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/delete.php new file mode 100644 index 000000000000..849f8e2d0bcf --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/delete.php @@ -0,0 +1,53 @@ +delete(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote.php new file mode 100644 index 000000000000..c56c88bbd27f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote.php @@ -0,0 +1,68 @@ +demote($instance, $project); + 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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + demote_sample($instance, $project); +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Demote_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote_master.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote_master.php new file mode 100644 index 000000000000..41dcbcc340ca --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/demote_master.php @@ -0,0 +1,54 @@ +demoteMaster(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_DemoteMaster_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/export.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/export.php new file mode 100644 index 000000000000..f7d5dbb49076 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/export.php @@ -0,0 +1,54 @@ +export(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Export_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/failover.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/failover.php new file mode 100644 index 000000000000..d3be32f52d1f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/failover.php @@ -0,0 +1,60 @@ +failover(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Failover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get.php new file mode 100644 index 000000000000..9844f3589bc9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get.php @@ -0,0 +1,53 @@ +get(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_disk_shrink_config.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_disk_shrink_config.php new file mode 100644 index 000000000000..fad20e23ca0c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_disk_shrink_config.php @@ -0,0 +1,53 @@ +getDiskShrinkConfig(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_GetDiskShrinkConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_latest_recovery_time.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_latest_recovery_time.php new file mode 100644 index 000000000000..ed4f1f72656e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/get_latest_recovery_time.php @@ -0,0 +1,53 @@ +getLatestRecoveryTime(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_GetLatestRecoveryTime_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/import.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/import.php new file mode 100644 index 000000000000..406d8a77bfb1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/import.php @@ -0,0 +1,54 @@ +import(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Import_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/insert.php new file mode 100644 index 000000000000..2af1fd6f5ec3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/insert.php @@ -0,0 +1,53 @@ +insert(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list.php new file mode 100644 index 000000000000..acf83e388587 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list.php @@ -0,0 +1,53 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list_server_cas.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list_server_cas.php new file mode 100644 index 000000000000..4f183fa5eab3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/list_server_cas.php @@ -0,0 +1,57 @@ +listServerCas(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_ListServerCas_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/patch.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/patch.php new file mode 100644 index 000000000000..f6d08b3bcbf0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/patch.php @@ -0,0 +1,54 @@ +patch(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Patch_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/perform_disk_shrink.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/perform_disk_shrink.php new file mode 100644 index 000000000000..29aa3b769237 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/perform_disk_shrink.php @@ -0,0 +1,53 @@ +performDiskShrink(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_PerformDiskShrink_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/promote_replica.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/promote_replica.php new file mode 100644 index 000000000000..b4d9767c9d40 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/promote_replica.php @@ -0,0 +1,54 @@ +promoteReplica(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_PromoteReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reencrypt.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reencrypt.php new file mode 100644 index 000000000000..d19a77052e94 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reencrypt.php @@ -0,0 +1,53 @@ +reencrypt(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Reencrypt_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php new file mode 100644 index 000000000000..6b4fcf66f3cc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php @@ -0,0 +1,71 @@ +releaseSsrsLease($instance, $project); + 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 +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + release_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_ReleaseSsrsLease_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reschedule_maintenance.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reschedule_maintenance.php new file mode 100644 index 000000000000..ef825e8f3c83 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reschedule_maintenance.php @@ -0,0 +1,53 @@ +rescheduleMaintenance(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_replica_size.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_replica_size.php new file mode 100644 index 000000000000..65d903b4a013 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_replica_size.php @@ -0,0 +1,53 @@ +resetReplicaSize(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_ResetReplicaSize_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_ssl_config.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_ssl_config.php new file mode 100644 index 000000000000..e296c586d8ea --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/reset_ssl_config.php @@ -0,0 +1,54 @@ +resetSslConfig(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_ResetSslConfig_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restart.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restart.php new file mode 100644 index 000000000000..291f100d32ac --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restart.php @@ -0,0 +1,53 @@ +restart(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Restart_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restore_backup.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restore_backup.php new file mode 100644 index 000000000000..386e4409951a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/restore_backup.php @@ -0,0 +1,54 @@ +restoreBackup(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_RestoreBackup_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/rotate_server_ca.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/rotate_server_ca.php new file mode 100644 index 000000000000..8728bd4ac67a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/rotate_server_ca.php @@ -0,0 +1,54 @@ +rotateServerCa(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_RotateServerCa_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_external_sync.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_external_sync.php new file mode 100644 index 000000000000..e3fe00ebedb7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_external_sync.php @@ -0,0 +1,53 @@ +startExternalSync(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_StartExternalSync_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_replica.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_replica.php new file mode 100644 index 000000000000..a7c500fbfc84 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/start_replica.php @@ -0,0 +1,53 @@ +startReplica(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_StartReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/stop_replica.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/stop_replica.php new file mode 100644 index 000000000000..f3676211a032 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/stop_replica.php @@ -0,0 +1,53 @@ +stopReplica(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_StopReplica_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/switchover.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/switchover.php new file mode 100644 index 000000000000..c5ee94c57b07 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/switchover.php @@ -0,0 +1,53 @@ +switchover(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Switchover_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/truncate_log.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/truncate_log.php new file mode 100644 index 000000000000..dc3c16deaa3f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/truncate_log.php @@ -0,0 +1,54 @@ +truncateLog(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_TruncateLog_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/update.php new file mode 100644 index 000000000000..483e7ff00cb3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/update.php @@ -0,0 +1,54 @@ +update(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/verify_external_sync_settings.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/verify_external_sync_settings.php new file mode 100644 index 000000000000..3e5d02ddc848 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlInstancesServiceClient/verify_external_sync_settings.php @@ -0,0 +1,53 @@ +verifyExternalSyncSettings(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_VerifyExternalSyncSettings_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/cancel.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/cancel.php new file mode 100644 index 000000000000..00ff366ef854 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/cancel.php @@ -0,0 +1,51 @@ +cancel(); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlOperationsService_Cancel_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/get.php new file mode 100644 index 000000000000..194a939c4f5c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/get.php @@ -0,0 +1,53 @@ +get(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlOperationsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/list.php new file mode 100644 index 000000000000..1028c66ebf33 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlOperationsServiceClient/list.php @@ -0,0 +1,54 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlOperationsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/delete.php new file mode 100644 index 000000000000..e7addc7b18de --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/delete.php @@ -0,0 +1,54 @@ +delete(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlSslCertsService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/get.php new file mode 100644 index 000000000000..a49a02f6d945 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/get.php @@ -0,0 +1,55 @@ +get(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlSslCertsService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/insert.php new file mode 100644 index 000000000000..768572c13b2b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/insert.php @@ -0,0 +1,55 @@ +insert(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlSslCertsService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/list.php new file mode 100644 index 000000000000..00bd64c70526 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlSslCertsServiceClient/list.php @@ -0,0 +1,53 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlSslCertsService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlTiersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlTiersServiceClient/list.php new file mode 100644 index 000000000000..5a1aa92945a1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlTiersServiceClient/list.php @@ -0,0 +1,54 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlTiersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/delete.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/delete.php new file mode 100644 index 000000000000..0d0f002c9535 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/delete.php @@ -0,0 +1,53 @@ +delete(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlUsersService_Delete_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/get.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/get.php new file mode 100644 index 000000000000..13fbee8d3d19 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/get.php @@ -0,0 +1,53 @@ +get(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlUsersService_Get_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/insert.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/insert.php new file mode 100644 index 000000000000..5a0e87f6eb23 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/insert.php @@ -0,0 +1,53 @@ +insert(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlUsersService_Insert_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/list.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/list.php new file mode 100644 index 000000000000..3d17ae491e9d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/list.php @@ -0,0 +1,53 @@ +list(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlUsersService_List_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/update.php b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/update.php new file mode 100644 index 000000000000..9aa8e9626f09 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/samples/V1beta4/SqlUsersServiceClient/update.php @@ -0,0 +1,53 @@ +update(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END sqladmin_v1beta4_generated_SqlUsersService_Update_sync] diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlBackupRunsServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlBackupRunsServiceGapicClient.php new file mode 100644 index 000000000000..6f33d53ae7aa --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlBackupRunsServiceGapicClient.php @@ -0,0 +1,414 @@ +delete(); + * } finally { + * $sqlBackupRunsServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlBackupRunsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlBackupRunsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_backup_runs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_backup_runs_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Deletes the backup taken by a backup run. + * + * Sample code: + * ``` + * $sqlBackupRunsServiceClient = new SqlBackupRunsServiceClient(); + * try { + * $response = $sqlBackupRunsServiceClient->delete(); + * } finally { + * $sqlBackupRunsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $id + * The ID of the backup run to delete. To find a backup run ID, use the + * [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) + * method. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function delete(array $optionalArgs = []) + { + $request = new SqlBackupRunsDeleteRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['id'])) { + $request->setId($optionalArgs['id']); + $requestParamHeaders['id'] = $optionalArgs['id']; + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Delete', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a resource containing information about a backup run. + * + * Sample code: + * ``` + * $sqlBackupRunsServiceClient = new SqlBackupRunsServiceClient(); + * try { + * $response = $sqlBackupRunsServiceClient->get(); + * } finally { + * $sqlBackupRunsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $id + * The ID of this backup run. + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\BackupRun + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function get(array $optionalArgs = []) + { + $request = new SqlBackupRunsGetRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['id'])) { + $request->setId($optionalArgs['id']); + $requestParamHeaders['id'] = $optionalArgs['id']; + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', BackupRun::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new backup run on demand. + * + * Sample code: + * ``` + * $sqlBackupRunsServiceClient = new SqlBackupRunsServiceClient(); + * try { + * $response = $sqlBackupRunsServiceClient->insert(); + * } finally { + * $sqlBackupRunsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type BackupRun $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function insert(array $optionalArgs = []) + { + $request = new SqlBackupRunsInsertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Insert', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all backup runs associated with the project or a given instance and + * configuration in the reverse chronological order of the backup initiation + * time. + * + * Sample code: + * ``` + * $sqlBackupRunsServiceClient = new SqlBackupRunsServiceClient(); + * try { + * $response = $sqlBackupRunsServiceClient->list(); + * } finally { + * $sqlBackupRunsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID, or "-" for all instances. This does not include + * the project ID. + * @type int $maxResults + * Maximum number of backup runs per response. + * @type string $pageToken + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\BackupRunsListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlBackupRunsListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', BackupRunsListResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlConnectServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlConnectServiceGapicClient.php new file mode 100644 index 000000000000..6075a9b44e60 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlConnectServiceGapicClient.php @@ -0,0 +1,309 @@ +generateEphemeralCert(); + * } finally { + * $sqlConnectServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlConnectServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlConnectService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_connect_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_connect_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_connect_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_connect_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Generates a short-lived X509 certificate containing the provided public key + * and signed by a private key specific to the target instance. Users may use + * the certificate to authenticate as themselves when connecting to the + * database. + * + * Sample code: + * ``` + * $sqlConnectServiceClient = new SqlConnectServiceClient(); + * try { + * $response = $sqlConnectServiceClient->generateEphemeralCert(); + * } finally { + * $sqlConnectServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $publicKey + * PEM encoded public key to include in the signed certificate. + * @type string $accessToken + * Optional. Access token to include in the signed certificate. + * @type Timestamp $readTime + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * @type Duration $validDuration + * Optional. If set, it will contain the cert valid duration. + * @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 \Google\Cloud\Sql\V1beta4\GenerateEphemeralCertResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function generateEphemeralCert(array $optionalArgs = []) + { + $request = new GenerateEphemeralCertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['publicKey'])) { + $request->setPublicKey($optionalArgs['publicKey']); + } + + if (isset($optionalArgs['accessToken'])) { + $request->setAccessToken($optionalArgs['accessToken']); + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + if (isset($optionalArgs['validDuration'])) { + $request->setValidDuration($optionalArgs['validDuration']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GenerateEphemeralCert', GenerateEphemeralCertResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves connect settings about a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlConnectServiceClient = new SqlConnectServiceClient(); + * try { + * $response = $sqlConnectServiceClient->getConnectSettings(); + * } finally { + * $sqlConnectServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type Timestamp $readTime + * Optional. Optional snapshot read timestamp to trade freshness for + * performance. + * @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 \Google\Cloud\Sql\V1beta4\ConnectSettings + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getConnectSettings(array $optionalArgs = []) + { + $request = new GetConnectSettingsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['readTime'])) { + $request->setReadTime($optionalArgs['readTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetConnectSettings', ConnectSettings::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlDatabasesServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlDatabasesServiceGapicClient.php new file mode 100644 index 000000000000..74ca3ab2514f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlDatabasesServiceGapicClient.php @@ -0,0 +1,529 @@ +delete(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlDatabasesServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlDatabasesService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_databases_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_databases_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_databases_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_databases_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Deletes a database from a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlDatabasesServiceClient = new SqlDatabasesServiceClient(); + * try { + * $response = $sqlDatabasesServiceClient->delete(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $database + * Name of the database to be deleted in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function delete(array $optionalArgs = []) + { + $request = new SqlDatabasesDeleteRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['database'])) { + $request->setDatabase($optionalArgs['database']); + $requestParamHeaders['database'] = $optionalArgs['database']; + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Delete', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a resource containing information about a database inside a Cloud + * SQL instance. + * + * Sample code: + * ``` + * $sqlDatabasesServiceClient = new SqlDatabasesServiceClient(); + * try { + * $response = $sqlDatabasesServiceClient->get(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $database + * Name of the database in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Database + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function get(array $optionalArgs = []) + { + $request = new SqlDatabasesGetRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['database'])) { + $request->setDatabase($optionalArgs['database']); + $requestParamHeaders['database'] = $optionalArgs['database']; + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', Database::class, $optionalArgs, $request)->wait(); + } + + /** + * Inserts a resource containing information about a database inside a Cloud + * SQL instance. + * + * **Note:** You can't modify the default character set and collation. + * + * Sample code: + * ``` + * $sqlDatabasesServiceClient = new SqlDatabasesServiceClient(); + * try { + * $response = $sqlDatabasesServiceClient->insert(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type Database $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function insert(array $optionalArgs = []) + { + $request = new SqlDatabasesInsertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Insert', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists databases in the specified Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlDatabasesServiceClient = new SqlDatabasesServiceClient(); + * try { + * $response = $sqlDatabasesServiceClient->list(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\DatabasesListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlDatabasesListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', DatabasesListResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Partially updates a resource containing information about a database inside + * a Cloud SQL instance. This method supports patch semantics. + * + * Sample code: + * ``` + * $sqlDatabasesServiceClient = new SqlDatabasesServiceClient(); + * try { + * $response = $sqlDatabasesServiceClient->patch(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $database + * Name of the database to be updated in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type Database $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function patch(array $optionalArgs = []) + { + $request = new SqlDatabasesUpdateRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['database'])) { + $request->setDatabase($optionalArgs['database']); + $requestParamHeaders['database'] = $optionalArgs['database']; + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Patch', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a resource containing information about a database inside a Cloud + * SQL instance. + * + * Sample code: + * ``` + * $sqlDatabasesServiceClient = new SqlDatabasesServiceClient(); + * try { + * $response = $sqlDatabasesServiceClient->update(); + * } finally { + * $sqlDatabasesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $database + * Name of the database to be updated in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type Database $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function update(array $optionalArgs = []) + { + $request = new SqlDatabasesUpdateRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['database'])) { + $request->setDatabase($optionalArgs['database']); + $requestParamHeaders['database'] = $optionalArgs['database']; + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Update', Operation::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlFlagsServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlFlagsServiceGapicClient.php new file mode 100644 index 000000000000..3cff0a41d270 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlFlagsServiceGapicClient.php @@ -0,0 +1,208 @@ +list(); + * } finally { + * $sqlFlagsServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlFlagsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlFlagsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_flags_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_flags_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_flags_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_flags_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Lists all available database flags for Cloud SQL instances. + * + * Sample code: + * ``` + * $sqlFlagsServiceClient = new SqlFlagsServiceClient(); + * try { + * $response = $sqlFlagsServiceClient->list(); + * } finally { + * $sqlFlagsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $databaseVersion + * Database type and version you want to retrieve flags for. By default, this + * method returns flags for all database types and versions. + * @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 \Google\Cloud\Sql\V1beta4\FlagsListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlFlagsListRequest(); + if (isset($optionalArgs['databaseVersion'])) { + $request->setDatabaseVersion($optionalArgs['databaseVersion']); + } + + return $this->startCall('List', FlagsListResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlIamPoliciesServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlIamPoliciesServiceGapicClient.php new file mode 100644 index 000000000000..c5b2bf3b507a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlIamPoliciesServiceGapicClient.php @@ -0,0 +1,151 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_iam_policies_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_iam_policies_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php new file mode 100644 index 000000000000..0654532735f0 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php @@ -0,0 +1,2182 @@ +acquireSsrsLease($instance, $project); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlInstancesServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlInstancesService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_instances_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_instances_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_instances_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_instances_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $instance = 'instance'; + * $project = 'project'; + * $response = $sqlInstancesServiceClient->acquireSsrsLease($instance, $project); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param string $instance Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @param string $project Required. ID of the project that contains the instance (Example: + * project-id). + * @param array $optionalArgs { + * Optional. + * + * @type InstancesAcquireSsrsLeaseRequest $body + * The body for request to acquire an SSRS lease. + * @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 \Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function acquireSsrsLease($instance, $project, array $optionalArgs = []) + { + $request = new SqlInstancesAcquireSsrsLeaseRequest(); + $requestParamHeaders = []; + $request->setInstance($instance); + $request->setProject($project); + $requestParamHeaders['instance'] = $instance; + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AcquireSsrsLease', SqlInstancesAcquireSsrsLeaseResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Add a new trusted Certificate Authority (CA) version for the specified + * instance. Required to prepare for a certificate rotation. If a CA version + * was previously added but never used in a certificate rotation, this + * operation replaces that version. There cannot be more than one CA version + * waiting to be rotated in. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->addServerCa(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function addServerCa(array $optionalArgs = []) + { + $request = new SqlInstancesAddServerCaRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('AddServerCa', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a Cloud SQL instance as a clone of the source instance. Using this + * operation might cause your instance to restart. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->clone(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * The ID of the Cloud SQL instance to be cloned (source). This does not + * include the project ID. + * @type string $project + * Project ID of the source as well as the clone Cloud SQL instance. + * @type InstancesCloneRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function clone(array $optionalArgs = []) + { + $request = new SqlInstancesCloneRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Clone', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Generates a short-lived X509 certificate containing the provided public key + * and signed by a private key specific to the target instance. Users may use + * the certificate to authenticate as themselves when connecting to the + * database. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->createEphemeral(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type SslCertsCreateEphemeralRequest $body + * @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 \Google\Cloud\Sql\V1beta4\SslCert + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createEphemeral(array $optionalArgs = []) + { + $request = new SqlInstancesCreateEphemeralCertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateEphemeral', SslCert::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->delete(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be deleted. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function delete(array $optionalArgs = []) + { + $request = new SqlInstancesDeleteRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Delete', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Demotes an existing standalone instance to be a Cloud SQL read replica + * for an external database server. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $instance = 'instance'; + * $project = 'project'; + * $response = $sqlInstancesServiceClient->demote($instance, $project); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param string $instance Required. The name of the Cloud SQL instance. + * @param string $project Required. The project ID of the project that contains the instance. + * @param array $optionalArgs { + * Optional. + * + * @type InstancesDemoteRequest $body + * The request body. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function demote($instance, $project, array $optionalArgs = []) + { + $request = new SqlInstancesDemoteRequest(); + $requestParamHeaders = []; + $request->setInstance($instance); + $request->setProject($project); + $requestParamHeaders['instance'] = $instance; + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Demote', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Demotes the stand-alone instance to be a Cloud SQL read replica for an + * external database server. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->demoteMaster(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance name. + * @type string $project + * ID of the project that contains the instance. + * @type InstancesDemoteMasterRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function demoteMaster(array $optionalArgs = []) + { + $request = new SqlInstancesDemoteMasterRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DemoteMaster', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL + * dump or CSV file. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->export(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * The Cloud SQL instance ID. This doesn't include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be exported. + * @type InstancesExportRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function export(array $optionalArgs = []) + { + $request = new SqlInstancesExportRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Export', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Initiates a manual failover of a high availability (HA) primary instance + * to a standby instance, which becomes the primary instance. Users are + * then rerouted to the new primary. For more information, see the + * [Overview of high + * availability](https://cloud.google.com/sql/docs/mysql/high-availability) + * page in the Cloud SQL documentation. + * If using Legacy HA (MySQL only), this causes the instance to failover to + * its failover replica instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->failover(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the read replica. + * @type InstancesFailoverRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function failover(array $optionalArgs = []) + { + $request = new SqlInstancesFailoverRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Failover', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a resource containing information about a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->get(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\DatabaseInstance + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function get(array $optionalArgs = []) + { + $request = new SqlInstancesGetRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', DatabaseInstance::class, $optionalArgs, $request)->wait(); + } + + /** + * Get Disk Shrink Config for a given instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->getDiskShrinkConfig(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\SqlInstancesGetDiskShrinkConfigResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getDiskShrinkConfig(array $optionalArgs = []) + { + $request = new SqlInstancesGetDiskShrinkConfigRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetDiskShrinkConfig', SqlInstancesGetDiskShrinkConfigResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Get Latest Recovery Time for a given instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->getLatestRecoveryTime(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\SqlInstancesGetLatestRecoveryTimeResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getLatestRecoveryTime(array $optionalArgs = []) + { + $request = new SqlInstancesGetLatestRecoveryTimeRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetLatestRecoveryTime', SqlInstancesGetLatestRecoveryTimeResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Imports data into a Cloud SQL instance from a SQL dump or CSV file in + * Cloud Storage. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->import(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type InstancesImportRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function import(array $optionalArgs = []) + { + $request = new SqlInstancesImportRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Import', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->insert(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $project + * Project ID of the project to which the newly created Cloud SQL instances + * should belong. + * @type DatabaseInstance $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function insert(array $optionalArgs = []) + { + $request = new SqlInstancesInsertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Insert', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists instances under a given project. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->list(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. + * The expression is in the form of field:value. For example, + * 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per + * their JSON representation, such as 'settings.userLabels.auto_start:true'. + * + * Multiple filter queries are space-separated. For example. + * 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each + * expression is an AND expression. However, you can include AND and OR + * expressions explicitly. + * @type int $maxResults + * The maximum number of instances to return. The service may return fewer + * than this value. + * If unspecified, at most 500 instances are returned. + * The maximum value is 1000; values above 1000 are coerced to 1000. + * @type string $pageToken + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project for which to list Cloud SQL instances. + * @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 \Google\Cloud\Sql\V1beta4\InstancesListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlInstancesListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', InstancesListResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all of the trusted Certificate Authorities (CAs) for the specified + * instance. There can be up to three CAs listed: the CA that was used to sign + * the certificate that is currently in use, a CA that has been added but not + * yet used to sign a certificate, and a CA used to sign a certificate that + * has previously rotated out. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->listServerCas(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\InstancesListServerCasResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listServerCas(array $optionalArgs = []) + { + $request = new SqlInstancesListServerCasRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListServerCas', InstancesListServerCasResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Partially updates settings of a Cloud SQL instance by merging the request + * with the current configuration. This method supports patch semantics. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->patch(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type DatabaseInstance $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function patch(array $optionalArgs = []) + { + $request = new SqlInstancesPatchRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Patch', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Perform Disk Shrink on primary instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->performDiskShrink(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type PerformDiskShrinkContext $body + * Perform disk shrink context. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function performDiskShrink(array $optionalArgs = []) + { + $request = new SqlInstancesPerformDiskShrinkRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PerformDiskShrink', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Promotes the read replica instance to be a stand-alone Cloud SQL instance. + * Using this operation might cause your instance to restart. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->promoteReplica(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @type bool $failover + * Set to true if the promote operation should attempt to re-add the original + * primary as a replica when it comes back online. Otherwise, if this value is + * false or not set, the original primary will be a standalone instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function promoteReplica(array $optionalArgs = []) + { + $request = new SqlInstancesPromoteReplicaRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['failover'])) { + $request->setFailover($optionalArgs['failover']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('PromoteReplica', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Reencrypt CMEK instance with latest key version. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->reencrypt(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type InstancesReencryptRequest $body + * Reencrypt body that users request + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function reencrypt(array $optionalArgs = []) + { + $request = new SqlInstancesReencryptRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Reencrypt', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $instance = 'instance'; + * $project = 'project'; + * $response = $sqlInstancesServiceClient->releaseSsrsLease($instance, $project); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param string $instance Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @param string $project Required. The ID of the project that contains the instance (Example: + * project-id). + * @param array $optionalArgs { + * 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 \Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function releaseSsrsLease($instance, $project, array $optionalArgs = []) + { + $request = new SqlInstancesReleaseSsrsLeaseRequest(); + $requestParamHeaders = []; + $request->setInstance($instance); + $request->setProject($project); + $requestParamHeaders['instance'] = $instance; + $requestParamHeaders['project'] = $project; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ReleaseSsrsLease', SqlInstancesReleaseSsrsLeaseResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Reschedules the maintenance on the given instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->rescheduleMaintenance(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type SqlInstancesRescheduleMaintenanceRequestBody $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function rescheduleMaintenance(array $optionalArgs = []) + { + $request = new SqlInstancesRescheduleMaintenanceRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RescheduleMaintenance', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Reset Replica Size to primary instance disk size. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->resetReplicaSize(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function resetReplicaSize(array $optionalArgs = []) + { + $request = new SqlInstancesResetReplicaSizeRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResetReplicaSize', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes all client certificates and generates a new server SSL certificate + * for the instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->resetSslConfig(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function resetSslConfig(array $optionalArgs = []) + { + $request = new SqlInstancesResetSslConfigRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ResetSslConfig', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Restarts a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->restart(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance to be restarted. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function restart(array $optionalArgs = []) + { + $request = new SqlInstancesRestartRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Restart', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Restores a backup of a Cloud SQL instance. Using this operation might cause + * your instance to restart. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->restoreBackup(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type InstancesRestoreBackupRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function restoreBackup(array $optionalArgs = []) + { + $request = new SqlInstancesRestoreBackupRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RestoreBackup', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Rotates the server certificate to one signed by the Certificate Authority + * (CA) version previously added with the addServerCA method. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->rotateServerCa(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type InstancesRotateServerCaRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function rotateServerCa(array $optionalArgs = []) + { + $request = new SqlInstancesRotateServerCaRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RotateServerCa', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Start External primary instance migration. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->startExternalSync(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * ID of the project that contains the instance. + * @type int $syncMode + * External sync mode. + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode} + * @type bool $skipVerification + * Whether to skip the verification step (VESS). + * @type MySqlSyncConfig $mysqlSyncConfig + * MySQL-specific settings for start external sync. + * @type int $syncParallelLevel + * Optional. Parallel level for initial data sync. Currently only applicable + * for MySQL. + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel} + * @type int $migrationType + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType} + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function startExternalSync(array $optionalArgs = []) + { + $request = new SqlInstancesStartExternalSyncRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['syncMode'])) { + $request->setSyncMode($optionalArgs['syncMode']); + } + + if (isset($optionalArgs['skipVerification'])) { + $request->setSkipVerification($optionalArgs['skipVerification']); + } + + if (isset($optionalArgs['mysqlSyncConfig'])) { + $request->setMysqlSyncConfig($optionalArgs['mysqlSyncConfig']); + } + + if (isset($optionalArgs['syncParallelLevel'])) { + $request->setSyncParallelLevel($optionalArgs['syncParallelLevel']); + } + + if (isset($optionalArgs['migrationType'])) { + $request->setMigrationType($optionalArgs['migrationType']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('StartExternalSync', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Starts the replication in the read replica instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->startReplica(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function startReplica(array $optionalArgs = []) + { + $request = new SqlInstancesStartReplicaRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('StartReplica', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Stops the replication in the read replica instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->stopReplica(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the read replica. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function stopReplica(array $optionalArgs = []) + { + $request = new SqlInstancesStopReplicaRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('StopReplica', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Switches over from the primary instance to a replica instance. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->switchover(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL read replica instance name. + * @type string $project + * ID of the project that contains the replica. + * @type Duration $dbTimeout + * Optional. (MySQL only) Cloud SQL instance operations timeout, which is a + * sum of all database operations. Default value is 10 minutes and can be + * modified to a maximum value of 24 hours. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function switchover(array $optionalArgs = []) + { + $request = new SqlInstancesSwitchoverRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['dbTimeout'])) { + $request->setDbTimeout($optionalArgs['dbTimeout']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Switchover', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Truncate MySQL general and slow query log tables + * MySQL only. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->truncateLog(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the Cloud SQL project. + * @type InstancesTruncateLogRequest $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function truncateLog(array $optionalArgs = []) + { + $request = new SqlInstancesTruncateLogRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TruncateLog', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates settings of a Cloud SQL instance. Using this operation might cause + * your instance to restart. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->update(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type DatabaseInstance $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function update(array $optionalArgs = []) + { + $request = new SqlInstancesUpdateRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Update', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Verify External primary instance external sync settings. + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $response = $sqlInstancesServiceClient->verifyExternalSyncSettings(); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type bool $verifyConnectionOnly + * Flag to enable verifying connection only + * @type int $syncMode + * External sync mode + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\ExternalSyncMode} + * @type bool $verifyReplicationOnly + * Optional. Flag to verify settings required by replication setup only + * @type MySqlSyncConfig $mysqlSyncConfig + * Optional. MySQL-specific settings for start external sync. + * @type int $migrationType + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType} + * @type int $syncParallelLevel + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel} + * @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 \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function verifyExternalSyncSettings(array $optionalArgs = []) + { + $request = new SqlInstancesVerifyExternalSyncSettingsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['verifyConnectionOnly'])) { + $request->setVerifyConnectionOnly($optionalArgs['verifyConnectionOnly']); + } + + if (isset($optionalArgs['syncMode'])) { + $request->setSyncMode($optionalArgs['syncMode']); + } + + if (isset($optionalArgs['verifyReplicationOnly'])) { + $request->setVerifyReplicationOnly($optionalArgs['verifyReplicationOnly']); + } + + if (isset($optionalArgs['mysqlSyncConfig'])) { + $request->setMysqlSyncConfig($optionalArgs['mysqlSyncConfig']); + } + + if (isset($optionalArgs['migrationType'])) { + $request->setMigrationType($optionalArgs['migrationType']); + } + + if (isset($optionalArgs['syncParallelLevel'])) { + $request->setSyncParallelLevel($optionalArgs['syncParallelLevel']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('VerifyExternalSyncSettings', SqlInstancesVerifyExternalSyncSettingsResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlOperationsServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlOperationsServiceGapicClient.php new file mode 100644 index 000000000000..e17001839e1b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlOperationsServiceGapicClient.php @@ -0,0 +1,336 @@ +cancel(); + * } finally { + * $sqlOperationsServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlOperationsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlOperationsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_operations_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_operations_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_operations_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_operations_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Cancels an instance operation that has been performed on an instance. + * + * Sample code: + * ``` + * $sqlOperationsServiceClient = new SqlOperationsServiceClient(); + * try { + * $sqlOperationsServiceClient->cancel(); + * } finally { + * $sqlOperationsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function cancel(array $optionalArgs = []) + { + $request = new SqlOperationsCancelRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['operation'])) { + $request->setOperation($optionalArgs['operation']); + $requestParamHeaders['operation'] = $optionalArgs['operation']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Cancel', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves an instance operation that has been performed on an instance. + * + * Sample code: + * ``` + * $sqlOperationsServiceClient = new SqlOperationsServiceClient(); + * try { + * $response = $sqlOperationsServiceClient->get(); + * } finally { + * $sqlOperationsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $operation + * Instance operation ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function get(array $optionalArgs = []) + { + $request = new SqlOperationsGetRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['operation'])) { + $request->setOperation($optionalArgs['operation']); + $requestParamHeaders['operation'] = $optionalArgs['operation']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all instance operations that have been performed on the given Cloud + * SQL instance in the reverse chronological order of the start time. + * + * Sample code: + * ``` + * $sqlOperationsServiceClient = new SqlOperationsServiceClient(); + * try { + * $response = $sqlOperationsServiceClient->list(); + * } finally { + * $sqlOperationsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type int $maxResults + * Maximum number of operations per response. + * @type string $pageToken + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\OperationsListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlOperationsListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', OperationsListResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlSslCertsServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlSslCertsServiceGapicClient.php new file mode 100644 index 000000000000..76a26fee07cc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlSslCertsServiceGapicClient.php @@ -0,0 +1,403 @@ +delete(); + * } finally { + * $sqlSslCertsServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlSslCertsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlSslCertsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_ssl_certs_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_ssl_certs_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Deletes the SSL certificate. For First Generation instances, the + * certificate remains valid until the instance is restarted. + * + * Sample code: + * ``` + * $sqlSslCertsServiceClient = new SqlSslCertsServiceClient(); + * try { + * $response = $sqlSslCertsServiceClient->delete(); + * } finally { + * $sqlSslCertsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1Fingerprint + * Sha1 FingerPrint. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function delete(array $optionalArgs = []) + { + $request = new SqlSslCertsDeleteRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['sha1Fingerprint'])) { + $request->setSha1Fingerprint($optionalArgs['sha1Fingerprint']); + $requestParamHeaders['sha1_fingerprint'] = $optionalArgs['sha1Fingerprint']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Delete', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a particular SSL certificate. Does not include the private key + * (required for usage). The private key must be saved from the response to + * initial creation. + * + * Sample code: + * ``` + * $sqlSslCertsServiceClient = new SqlSslCertsServiceClient(); + * try { + * $response = $sqlSslCertsServiceClient->get(); + * } finally { + * $sqlSslCertsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $sha1Fingerprint + * Sha1 FingerPrint. + * @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 \Google\Cloud\Sql\V1beta4\SslCert + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function get(array $optionalArgs = []) + { + $request = new SqlSslCertsGetRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['sha1Fingerprint'])) { + $request->setSha1Fingerprint($optionalArgs['sha1Fingerprint']); + $requestParamHeaders['sha1_fingerprint'] = $optionalArgs['sha1Fingerprint']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', SslCert::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates an SSL certificate and returns it along with the private key and + * server certificate authority. The new certificate will not be usable until + * the instance is restarted. + * + * Sample code: + * ``` + * $sqlSslCertsServiceClient = new SqlSslCertsServiceClient(); + * try { + * $response = $sqlSslCertsServiceClient->insert(); + * } finally { + * $sqlSslCertsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type SslCertsInsertRequest $body + * @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 \Google\Cloud\Sql\V1beta4\SslCertsInsertResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function insert(array $optionalArgs = []) + { + $request = new SqlSslCertsInsertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Insert', SslCertsInsertResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists all of the current SSL certificates for the instance. + * + * Sample code: + * ``` + * $sqlSslCertsServiceClient = new SqlSslCertsServiceClient(); + * try { + * $response = $sqlSslCertsServiceClient->list(); + * } finally { + * $sqlSslCertsServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Cloud SQL instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\SslCertsListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlSslCertsListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', SslCertsListResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlTiersServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlTiersServiceGapicClient.php new file mode 100644 index 000000000000..a02033f8ffee --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlTiersServiceGapicClient.php @@ -0,0 +1,213 @@ +list(); + * } finally { + * $sqlTiersServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlTiersServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlTiersService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_tiers_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_tiers_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_tiers_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_tiers_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Lists all available machine types (tiers) for Cloud SQL, for example, + * `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing). + * + * Sample code: + * ``` + * $sqlTiersServiceClient = new SqlTiersServiceClient(); + * try { + * $response = $sqlTiersServiceClient->list(); + * } finally { + * $sqlTiersServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $project + * Project ID of the project for which to list tiers. + * @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 \Google\Cloud\Sql\V1beta4\TiersListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlTiersListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', TiersListResponse::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlUsersServiceGapicClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlUsersServiceGapicClient.php new file mode 100644 index 000000000000..662245f98e15 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/Gapic/SqlUsersServiceGapicClient.php @@ -0,0 +1,476 @@ +delete(); + * } finally { + * $sqlUsersServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated This class will be removed in the next major version update. + */ +class SqlUsersServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.sql.v1beta4.SqlUsersService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'sqladmin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'sqladmin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/sqlservice.admin', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/sql_users_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/sql_users_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/sql_users_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/sql_users_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $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 'sqladmin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Deletes a user from a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlUsersServiceClient = new SqlUsersServiceClient(); + * try { + * $response = $sqlUsersServiceClient->delete(); + * } finally { + * $sqlUsersServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $host + * Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function delete(array $optionalArgs = []) + { + $request = new SqlUsersDeleteRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['host'])) { + $request->setHost($optionalArgs['host']); + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Delete', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a resource containing information about a user. + * + * Sample code: + * ``` + * $sqlUsersServiceClient = new SqlUsersServiceClient(); + * try { + * $response = $sqlUsersServiceClient->get(); + * } finally { + * $sqlUsersServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * User of the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type string $host + * Host of a user of the instance. + * @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 \Google\Cloud\Sql\V1beta4\User + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function get(array $optionalArgs = []) + { + $request = new SqlUsersGetRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['host'])) { + $request->setHost($optionalArgs['host']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', User::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new user in a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlUsersServiceClient = new SqlUsersServiceClient(); + * try { + * $response = $sqlUsersServiceClient->insert(); + * } finally { + * $sqlUsersServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @type User $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function insert(array $optionalArgs = []) + { + $request = new SqlUsersInsertRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Insert', Operation::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists users in the specified Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlUsersServiceClient = new SqlUsersServiceClient(); + * try { + * $response = $sqlUsersServiceClient->list(); + * } finally { + * $sqlUsersServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $project + * Project ID of the project that contains the instance. + * @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 \Google\Cloud\Sql\V1beta4\UsersListResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function list(array $optionalArgs = []) + { + $request = new SqlUsersListRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', UsersListResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates an existing user in a Cloud SQL instance. + * + * Sample code: + * ``` + * $sqlUsersServiceClient = new SqlUsersServiceClient(); + * try { + * $response = $sqlUsersServiceClient->update(); + * } finally { + * $sqlUsersServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $host + * Optional. Host of the user in the instance. + * @type string $instance + * Database instance ID. This does not include the project ID. + * @type string $name + * Name of the user in the instance. + * @type string $project + * Project ID of the project that contains the instance. + * @type User $body + * @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 \Google\Cloud\Sql\V1beta4\Operation + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function update(array $optionalArgs = []) + { + $request = new SqlUsersUpdateRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['host'])) { + $request->setHost($optionalArgs['host']); + } + + if (isset($optionalArgs['instance'])) { + $request->setInstance($optionalArgs['instance']); + $requestParamHeaders['instance'] = $optionalArgs['instance']; + } + + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + } + + if (isset($optionalArgs['project'])) { + $request->setProject($optionalArgs['project']); + $requestParamHeaders['project'] = $optionalArgs['project']; + } + + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Update', Operation::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlBackupRunsServiceClient.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlBackupRunsServiceClient.php new file mode 100644 index 000000000000..df388fd79880 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/SqlBackupRunsServiceClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.sql.v1beta4.SqlBackupRunsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php new file mode 100644 index 000000000000..5e1941f98fb4 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php @@ -0,0 +1,104 @@ + [ + 'google.cloud.sql.v1beta4.SqlBackupRunsService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', + 'placeholders' => [ + 'id' => [ + 'getters' => [ + 'getId', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', + 'placeholders' => [ + 'id' => [ + 'getters' => [ + 'getId', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_client_config.json new file mode 100644 index 000000000000..14ecbd0e909e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_client_config.json @@ -0,0 +1,32 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlConnectService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": { + "GenerateEphemeralCert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetConnectSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_descriptor_config.php new file mode 100644 index 000000000000..c276de114a2c --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlConnectService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_rest_client_config.php new file mode 100644 index 000000000000..01680b46fca6 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_connect_service_rest_client_config.php @@ -0,0 +1,62 @@ + [ + 'google.cloud.sql.v1beta4.SqlConnectService' => [ + 'GenerateEphemeralCert' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetConnectSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/connectSettings', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_client_config.json new file mode 100644 index 000000000000..055804e3da7a --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlDatabasesService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Patch": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_descriptor_config.php new file mode 100644 index 000000000000..ced86c484679 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlDatabasesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_rest_client_config.php new file mode 100644 index 000000000000..4273d5a60d65 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_databases_service_rest_client_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.sql.v1beta4.SqlDatabasesService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/databases', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/databases', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', + 'body' => 'body', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', + 'body' => 'body', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_client_config.json new file mode 100644 index 000000000000..721ac2d78745 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlFlagsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_descriptor_config.php new file mode 100644 index 000000000000..722c492d6de5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlFlagsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_rest_client_config.php new file mode 100644 index 000000000000..72038144262d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_flags_service_rest_client_config.php @@ -0,0 +1,33 @@ + [ + 'google.cloud.sql.v1beta4.SqlFlagsService' => [ + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/flags', + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_client_config.json new file mode 100644 index 000000000000..9a9e7f1fd199 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_client_config.json @@ -0,0 +1,21 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlIamPoliciesService": { + "retry_codes": { + "no_retry_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 + } + }, + "methods": [] + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php new file mode 100644 index 000000000000..7fd9309b7ccc --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlIamPoliciesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_client_config.json new file mode 100644 index 000000000000..57673d4b71f9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_client_config.json @@ -0,0 +1,202 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlInstancesService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AcquireSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "AddServerCa": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Clone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateEphemeral": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Demote": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DemoteMaster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Export": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Failover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDiskShrinkConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLatestRecoveryTime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Import": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListServerCas": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Patch": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PerformDiskShrink": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "PromoteReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Reencrypt": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReleaseSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RescheduleMaintenance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetReplicaSize": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetSslConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Restart": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RotateServerCa": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartExternalSync": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopReplica": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Switchover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TruncateLog": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "VerifyExternalSyncSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_descriptor_config.php new file mode 100644 index 000000000000..7f91a9fefa6e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlInstancesService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_rest_client_config.php new file mode 100644 index 000000000000..3dd890d997db --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_instances_service_rest_client_config.php @@ -0,0 +1,583 @@ + [ + 'google.cloud.sql.v1beta4.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'AddServerCa' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Clone' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/clone', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'CreateEphemeral' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Demote' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/demote', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'DemoteMaster' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Export' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/export', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Failover' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/failover', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetDiskShrinkConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'GetLatestRecoveryTime' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Import' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/import', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances', + 'body' => 'body', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ListServerCas' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/listServerCas', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'PerformDiskShrink' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'PromoteReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Reencrypt' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/reencrypt', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ReleaseSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ResetReplicaSize' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'ResetSslConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Restart' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/restart', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RestoreBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'RotateServerCa' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StartExternalSync' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StartReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/startReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'StopReplica' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/stopReplica', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Switchover' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/switchover', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'TruncateLog' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'VerifyExternalSyncSettings' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_client_config.json new file mode 100644 index 000000000000..c7a70de7e27d --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_client_config.json @@ -0,0 +1,47 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlOperationsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Cancel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_descriptor_config.php new file mode 100644 index 000000000000..35aeb6d8dfc5 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlOperationsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_rest_client_config.php new file mode 100644 index 000000000000..f4eb946d172e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_operations_service_rest_client_config.php @@ -0,0 +1,72 @@ + [ + 'google.cloud.sql.v1beta4.SqlOperationsService' => [ + 'Cancel' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/operations/{operation}/cancel', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_client_config.json new file mode 100644 index 000000000000..8a5459d886e7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlSslCertsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php new file mode 100644 index 000000000000..500d2fa8fb64 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlSslCertsService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php new file mode 100644 index 000000000000..293f6aa32a76 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php @@ -0,0 +1,104 @@ + [ + 'google.cloud.sql.v1beta4.SqlSslCertsService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'sha1_fingerprint' => [ + 'getters' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1_fingerprint}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'sha1_fingerprint' => [ + 'getters' => [ + 'getSha1Fingerprint', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_client_config.json new file mode 100644 index 000000000000..7e65adf7610b --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlTiersService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_descriptor_config.php new file mode 100644 index 000000000000..d045f4288667 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlTiersService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_rest_client_config.php new file mode 100644 index 000000000000..f0e4a5054597 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_tiers_service_rest_client_config.php @@ -0,0 +1,40 @@ + [ + 'google.cloud.sql.v1beta4.SqlTiersService' => [ + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/tiers', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_client_config.json b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_client_config.json new file mode 100644 index 000000000000..889877ec84ba --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.cloud.sql.v1beta4.SqlUsersService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "Delete": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Insert": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_descriptor_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_descriptor_config.php new file mode 100644 index 000000000000..acf4e556353e --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_descriptor_config.php @@ -0,0 +1,27 @@ + [ + 'google.cloud.sql.v1beta4.SqlUsersService' => [], + ], +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_rest_client_config.php b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_rest_client_config.php new file mode 100644 index 000000000000..6d389cb9910f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/src/V1beta4/resources/sql_users_service_rest_client_config.php @@ -0,0 +1,116 @@ + [ + 'google.cloud.sql.v1beta4.SqlUsersService' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/users', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/users/{name}', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/users', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/users', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'put', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/users', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlBackupRunsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlBackupRunsServiceClientTest.php new file mode 100644 index 000000000000..c84d0acd2ed1 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlBackupRunsServiceClientTest.php @@ -0,0 +1,317 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlBackupRunsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlBackupRunsServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->delete(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlBackupRunsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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); + try { + $gapicClient->delete(); + // 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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $id2 = 3227150; + $description = 'description-1724546052'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $location = 'location1901043637'; + $timeZone = 'timeZone36848094'; + $expectedResponse = new BackupRun(); + $expectedResponse->setKind($kind); + $expectedResponse->setId($id2); + $expectedResponse->setDescription($description); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setLocation($location); + $expectedResponse->setTimeZone($timeZone); + $transport->addResponse($expectedResponse); + $response = $gapicClient->get(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlBackupRunsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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); + try { + $gapicClient->get(); + // 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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->insert(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlBackupRunsService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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); + try { + $gapicClient->insert(); + // 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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new BackupRunsListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlBackupRunsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlConnectServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlConnectServiceClientTest.php new file mode 100644 index 000000000000..8ad3aa1affe9 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlConnectServiceClientTest.php @@ -0,0 +1,174 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlConnectServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlConnectServiceClient($options); + } + + /** @test */ + public function generateEphemeralCertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GenerateEphemeralCertResponse(); + $transport->addResponse($expectedResponse); + $response = $gapicClient->generateEphemeralCert(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlConnectService/GenerateEphemeralCert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateEphemeralCertExceptionTest() + { + $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); + try { + $gapicClient->generateEphemeralCert(); + // 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 getConnectSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $region = 'region-934795532'; + $pscEnabled = true; + $dnsName = 'dnsName411992033'; + $expectedResponse = new ConnectSettings(); + $expectedResponse->setKind($kind); + $expectedResponse->setRegion($region); + $expectedResponse->setPscEnabled($pscEnabled); + $expectedResponse->setDnsName($dnsName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getConnectSettings(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlConnectService/GetConnectSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectSettingsExceptionTest() + { + $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); + try { + $gapicClient->getConnectSettings(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlDatabasesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlDatabasesServiceClientTest.php new file mode 100644 index 000000000000..ffb3bc1a9886 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlDatabasesServiceClientTest.php @@ -0,0 +1,449 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlDatabasesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlDatabasesServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->delete(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlDatabasesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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); + try { + $gapicClient->delete(); + // 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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $charset = 'charset739074380'; + $collation = 'collation1880293257'; + $etag = 'etag3123477'; + $name = 'name3373707'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $project2 = 'project2-894831476'; + $expectedResponse = new Database(); + $expectedResponse->setKind($kind); + $expectedResponse->setCharset($charset); + $expectedResponse->setCollation($collation); + $expectedResponse->setEtag($etag); + $expectedResponse->setName($name); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setProject($project2); + $transport->addResponse($expectedResponse); + $response = $gapicClient->get(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlDatabasesService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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); + try { + $gapicClient->get(); + // 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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->insert(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlDatabasesService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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); + try { + $gapicClient->insert(); + // 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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new DatabasesListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlDatabasesService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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 patchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->patch(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlDatabasesService/Patch', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $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); + try { + $gapicClient->patch(); + // 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 updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->update(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlDatabasesService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $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); + try { + $gapicClient->update(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlFlagsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlFlagsServiceClientTest.php new file mode 100644 index 000000000000..734c9407a402 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlFlagsServiceClientTest.php @@ -0,0 +1,115 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlFlagsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlFlagsServiceClient($options); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new FlagsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlFlagsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlIamPoliciesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlIamPoliciesServiceClientTest.php new file mode 100644 index 000000000000..384d545b7ef2 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlIamPoliciesServiceClientTest.php @@ -0,0 +1,56 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlIamPoliciesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlIamPoliciesServiceClient($options); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php new file mode 100644 index 000000000000..cb277d631b8f --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php @@ -0,0 +1,2292 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlInstancesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlInstancesServiceClient($options); + } + + /** @test */ + public function acquireSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $response = $gapicClient->acquireSsrsLease($instance, $project); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireSsrsLeaseExceptionTest() + { + $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 + $instance = 'instance555127957'; + $project = 'project-309310695'; + try { + $gapicClient->acquireSsrsLease($instance, $project); + // 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 addServerCaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->addServerCa(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/AddServerCa', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addServerCaExceptionTest() + { + $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); + try { + $gapicClient->addServerCa(); + // 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 cloneTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->clone(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Clone', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cloneExceptionTest() + { + $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); + try { + $gapicClient->clone(); + // 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 createEphemeralTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $certSerialNumber = 'certSerialNumber-440611559'; + $cert = 'cert3050020'; + $commonName = 'commonName-1924955041'; + $sha1Fingerprint = 'sha1Fingerprint-1699692374'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new SslCert(); + $expectedResponse->setKind($kind); + $expectedResponse->setCertSerialNumber($certSerialNumber); + $expectedResponse->setCert($cert); + $expectedResponse->setCommonName($commonName); + $expectedResponse->setSha1Fingerprint($sha1Fingerprint); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + $response = $gapicClient->createEphemeral(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/CreateEphemeral', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEphemeralExceptionTest() + { + $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); + try { + $gapicClient->createEphemeral(); + // 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 deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->delete(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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); + try { + $gapicClient->delete(); + // 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 demoteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $response = $gapicClient->demote($instance, $project); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Demote', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteExceptionTest() + { + $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 + $instance = 'instance555127957'; + $project = 'project-309310695'; + try { + $gapicClient->demote($instance, $project); + // 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 demoteMasterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->demoteMaster(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/DemoteMaster', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function demoteMasterExceptionTest() + { + $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); + try { + $gapicClient->demoteMaster(); + // 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 exportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->export(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Export', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportExceptionTest() + { + $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); + try { + $gapicClient->export(); + // 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 failoverTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->failover(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Failover', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function failoverExceptionTest() + { + $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); + try { + $gapicClient->failover(); + // 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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $etag = 'etag3123477'; + $masterInstanceName = 'masterInstanceName-383886120'; + $project2 = 'project2-894831476'; + $ipv6Address = 'ipv6Address1952176540'; + $serviceAccountEmailAddress = 'serviceAccountEmailAddress303603125'; + $selfLink = 'selfLink-1691268851'; + $connectionName = 'connectionName731664204'; + $name = 'name3373707'; + $region = 'region-934795532'; + $gceZone = 'gceZone-227587294'; + $secondaryGceZone = 'secondaryGceZone826699149'; + $rootPassword = 'rootPassword448743768'; + $databaseInstalledVersion = 'databaseInstalledVersion-1701014705'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $pscServiceAttachmentLink = 'pscServiceAttachmentLink309057421'; + $dnsName = 'dnsName411992033'; + $primaryDnsName = 'primaryDnsName-1306966658'; + $writeEndpoint = 'writeEndpoint-1575656971'; + $expectedResponse = new DatabaseInstance(); + $expectedResponse->setKind($kind); + $expectedResponse->setEtag($etag); + $expectedResponse->setMasterInstanceName($masterInstanceName); + $expectedResponse->setProject($project2); + $expectedResponse->setIpv6Address($ipv6Address); + $expectedResponse->setServiceAccountEmailAddress($serviceAccountEmailAddress); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setConnectionName($connectionName); + $expectedResponse->setName($name); + $expectedResponse->setRegion($region); + $expectedResponse->setGceZone($gceZone); + $expectedResponse->setSecondaryGceZone($secondaryGceZone); + $expectedResponse->setRootPassword($rootPassword); + $expectedResponse->setDatabaseInstalledVersion($databaseInstalledVersion); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setPscServiceAttachmentLink($pscServiceAttachmentLink); + $expectedResponse->setDnsName($dnsName); + $expectedResponse->setPrimaryDnsName($primaryDnsName); + $expectedResponse->setWriteEndpoint($writeEndpoint); + $transport->addResponse($expectedResponse); + $response = $gapicClient->get(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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); + try { + $gapicClient->get(); + // 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 getDiskShrinkConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $minimalTargetSizeGb = 1076246647; + $message = 'message954925063'; + $expectedResponse = new SqlInstancesGetDiskShrinkConfigResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setMinimalTargetSizeGb($minimalTargetSizeGb); + $expectedResponse->setMessage($message); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getDiskShrinkConfig(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/GetDiskShrinkConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDiskShrinkConfigExceptionTest() + { + $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); + try { + $gapicClient->getDiskShrinkConfig(); + // 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 getLatestRecoveryTimeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SqlInstancesGetLatestRecoveryTimeResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLatestRecoveryTime(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/GetLatestRecoveryTime', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLatestRecoveryTimeExceptionTest() + { + $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); + try { + $gapicClient->getLatestRecoveryTime(); + // 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 importTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->import(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Import', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importExceptionTest() + { + $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); + try { + $gapicClient->import(); + // 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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->insert(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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); + try { + $gapicClient->insert(); + // 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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new InstancesListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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 listServerCasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $activeVersion = 'activeVersion442490015'; + $kind = 'kind3292052'; + $expectedResponse = new InstancesListServerCasResponse(); + $expectedResponse->setActiveVersion($activeVersion); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listServerCas(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/ListServerCas', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerCasExceptionTest() + { + $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); + try { + $gapicClient->listServerCas(); + // 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 patchTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->patch(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Patch', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $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); + try { + $gapicClient->patch(); + // 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 performDiskShrinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->performDiskShrink(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/PerformDiskShrink', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function performDiskShrinkExceptionTest() + { + $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); + try { + $gapicClient->performDiskShrink(); + // 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 promoteReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->promoteReplica(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/PromoteReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function promoteReplicaExceptionTest() + { + $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); + try { + $gapicClient->promoteReplica(); + // 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 reencryptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->reencrypt(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Reencrypt', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reencryptExceptionTest() + { + $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); + try { + $gapicClient->reencrypt(); + // 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 releaseSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $response = $gapicClient->releaseSsrsLease($instance, $project); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseSsrsLeaseExceptionTest() + { + $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 + $instance = 'instance555127957'; + $project = 'project-309310695'; + try { + $gapicClient->releaseSsrsLease($instance, $project); + // 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() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->rescheduleMaintenance(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/RescheduleMaintenance', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rescheduleMaintenanceExceptionTest() + { + $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); + try { + $gapicClient->rescheduleMaintenance(); + // 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 resetReplicaSizeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->resetReplicaSize(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/ResetReplicaSize', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetReplicaSizeExceptionTest() + { + $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); + try { + $gapicClient->resetReplicaSize(); + // 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 resetSslConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->resetSslConfig(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/ResetSslConfig', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetSslConfigExceptionTest() + { + $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); + try { + $gapicClient->resetSslConfig(); + // 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 restartTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->restart(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Restart', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restartExceptionTest() + { + $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); + try { + $gapicClient->restart(); + // 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 restoreBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->restoreBackup(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/RestoreBackup', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreBackupExceptionTest() + { + $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); + try { + $gapicClient->restoreBackup(); + // 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 rotateServerCaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->rotateServerCa(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/RotateServerCa', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rotateServerCaExceptionTest() + { + $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); + try { + $gapicClient->rotateServerCa(); + // 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 startExternalSyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->startExternalSync(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/StartExternalSync', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startExternalSyncExceptionTest() + { + $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); + try { + $gapicClient->startExternalSync(); + // 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 startReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->startReplica(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/StartReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startReplicaExceptionTest() + { + $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); + try { + $gapicClient->startReplica(); + // 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 stopReplicaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->stopReplica(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/StopReplica', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopReplicaExceptionTest() + { + $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); + try { + $gapicClient->stopReplica(); + // 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 switchoverTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->switchover(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Switchover', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function switchoverExceptionTest() + { + $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); + try { + $gapicClient->switchover(); + // 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 truncateLogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->truncateLog(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/TruncateLog', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function truncateLogExceptionTest() + { + $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); + try { + $gapicClient->truncateLog(); + // 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 updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->update(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $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); + try { + $gapicClient->update(); + // 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 verifyExternalSyncSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SqlInstancesVerifyExternalSyncSettingsResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->verifyExternalSyncSettings(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/VerifyExternalSyncSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyExternalSyncSettingsExceptionTest() + { + $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); + try { + $gapicClient->verifyExternalSyncSettings(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlOperationsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlOperationsServiceClientTest.php new file mode 100644 index 000000000000..bfc8479206be --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlOperationsServiceClientTest.php @@ -0,0 +1,236 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlOperationsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlOperationsServiceClient($options); + } + + /** @test */ + public function cancelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $gapicClient->cancel(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlOperationsService/Cancel', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelExceptionTest() + { + $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); + try { + $gapicClient->cancel(); + // 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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->get(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlOperationsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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); + try { + $gapicClient->get(); + // 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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new OperationsListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlOperationsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlSslCertsServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlSslCertsServiceClientTest.php new file mode 100644 index 000000000000..8554fc421b22 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlSslCertsServiceClientTest.php @@ -0,0 +1,304 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlSslCertsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlSslCertsServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->delete(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlSslCertsService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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); + try { + $gapicClient->delete(); + // 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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $certSerialNumber = 'certSerialNumber-440611559'; + $cert = 'cert3050020'; + $commonName = 'commonName-1924955041'; + $sha1Fingerprint2 = 'sha1Fingerprint2-1316795939'; + $instance2 = 'instance2902024968'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new SslCert(); + $expectedResponse->setKind($kind); + $expectedResponse->setCertSerialNumber($certSerialNumber); + $expectedResponse->setCert($cert); + $expectedResponse->setCommonName($commonName); + $expectedResponse->setSha1Fingerprint($sha1Fingerprint2); + $expectedResponse->setInstance($instance2); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + $response = $gapicClient->get(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlSslCertsService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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); + try { + $gapicClient->get(); + // 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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SslCertsInsertResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->insert(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlSslCertsService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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); + try { + $gapicClient->insert(); + // 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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new SslCertsListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlSslCertsService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlTiersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlTiersServiceClientTest.php new file mode 100644 index 000000000000..3b95388c43d7 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlTiersServiceClientTest.php @@ -0,0 +1,115 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlTiersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlTiersServiceClient($options); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $expectedResponse = new TiersListResponse(); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlTiersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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()); + } +} diff --git a/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlUsersServiceClientTest.php b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlUsersServiceClientTest.php new file mode 100644 index 000000000000..ab34996f1899 --- /dev/null +++ b/owl-bot-staging/SqlAdmin/v1beta4/tests/Unit/V1beta4/SqlUsersServiceClientTest.php @@ -0,0 +1,383 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SqlUsersServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SqlUsersServiceClient($options); + } + + /** @test */ + public function deleteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->delete(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlUsersService/Delete', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $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); + try { + $gapicClient->delete(); + // 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 getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $password = 'password1216985755'; + $etag = 'etag3123477'; + $name2 = 'name2-1052831874'; + $host2 = 'host2-1211484325'; + $instance2 = 'instance2902024968'; + $project2 = 'project2-894831476'; + $expectedResponse = new User(); + $expectedResponse->setKind($kind); + $expectedResponse->setPassword($password); + $expectedResponse->setEtag($etag); + $expectedResponse->setName($name2); + $expectedResponse->setHost($host2); + $expectedResponse->setInstance($instance2); + $expectedResponse->setProject($project2); + $transport->addResponse($expectedResponse); + $response = $gapicClient->get(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlUsersService/Get', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $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); + try { + $gapicClient->get(); + // 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 insertTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name = 'name3373707'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->insert(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlUsersService/Insert', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $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); + try { + $gapicClient->insert(); + // 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 listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $expectedResponse = new UsersListResponse(); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $transport->addResponse($expectedResponse); + $response = $gapicClient->list(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlUsersService/List', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $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); + try { + $gapicClient->list(); + // 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 updateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $kind = 'kind3292052'; + $targetLink = 'targetLink-2084812312'; + $user = 'user3599307'; + $name2 = 'name2-1052831874'; + $targetId = 'targetId-815576439'; + $selfLink = 'selfLink-1691268851'; + $targetProject = 'targetProject392184427'; + $expectedResponse = new Operation(); + $expectedResponse->setKind($kind); + $expectedResponse->setTargetLink($targetLink); + $expectedResponse->setUser($user); + $expectedResponse->setName($name2); + $expectedResponse->setTargetId($targetId); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setTargetProject($targetProject); + $transport->addResponse($expectedResponse); + $response = $gapicClient->update(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlUsersService/Update', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $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); + try { + $gapicClient->update(); + // 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()); + } +}