From 13dcad800568584480232908a9a610742a5ed608 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 21 Nov 2024 14:00:32 +0000 Subject: [PATCH 1/2] feat: A new method `RunStream` is added to service `Datastream` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileRequest` feat: A new field `sql_server_rdbms` is added to message `.google.cloud.datastream.v1.DiscoverConnectionProfileResponse` feat: A new message `RunStreamRequest` is added feat: A new field `oracle_ssl_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `oracle_asm_config` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new field `secret_manager_stored_password` is added to message `.google.cloud.datastream.v1.OracleProfile` feat: A new message `OracleAsmConfig` is added feat: A new message `SqlServerProfile` is added feat: A new message `OracleSslConfig` is added feat: A new field `sql_server_profile` is added to message `.google.cloud.datastream.v1.ConnectionProfile` feat: A new message `LogMiner` is added feat: A new message `BinaryLogParser` is added feat: A new field `log_miner` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new field `binary_log_parser` is added to message `.google.cloud.datastream.v1.OracleSourceConfig` feat: A new message `SqlServerColumn` is added feat: A new message `SqlServerTable` is added feat: A new message `SqlServerSchema` is added feat: A new message `SqlServerRdbms` is added feat: A new message `SqlServerSourceConfig` is added feat: A new message `SqlServerTransactionLogs` is added feat: A new message `SqlServerChangeTables` is added feat: A new message `BinaryLogPosition` is added feat: A new message `Gtid` is added feat: A new field `binary_log_position` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `gtid` is added to message `.google.cloud.datastream.v1.MysqlSourceConfig` feat: A new field `sql_server_source_config` is added to message `.google.cloud.datastream.v1.SourceConfig` feat: A new message `AppendOnly` is added feat: A new message `Merge` is added feat: A new field `merge` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `append_only` is added to message `.google.cloud.datastream.v1.BigQueryDestinationConfig` feat: A new field `sql_server_excluded_objects` is added to message `.google.cloud.datastream.v1.Stream` feat: A new field `last_recovery_time` is added to message `.google.cloud.datastream.v1.Stream` feat: A new message `SqlServerObjectIdentifier` is added feat: A new field `sql_server_identifier` is added to message `.google.cloud.datastream.v1.SourceObjectIdentifier` feat: A new value `WARNING` is added to enum `State` feat: A new message `CdcStrategy` is added feat: A new message `SqlServerLsnPosition` is added feat: A new message `OracleScnPosition` is added feat: A new message `MysqlLogPosition` is added docs: A comment for field `requested_cancellation` in message `.google.cloud.datastream.v1.OperationMetadata` is changed docs: A comment for message `OracleProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.OracleProfile` is changed docs: A comment for message `MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.MysqlProfile` is changed docs: A comment for field `password` in message `.google.cloud.datastream.v1.PostgresqlProfile` is changed docs: A comment for field `stream_large_objects` in message `.google.cloud.datastream.v1.OracleSourceConfig` is changed docs: A comment for field `dataset_id` in message `.google.cloud.datastream.v1.BigQueryDestinationConfig` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.BackfillJob` is changed docs: A comment for field `state` in message `.google.cloud.datastream.v1.Validation` is changed PiperOrigin-RevId: 698715682 Source-Link: https://github.com/googleapis/googleapis/commit/798a8beed228908584c64a2a3a5d11d8eeb290d8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1fe03a818c9c10b2d58ba7f34eb66c3f0a0819a Copy-Tag: eyJwIjoiRGF0YXN0cmVhbS8uT3dsQm90LnlhbWwiLCJoIjoiYzFmZTAzYTgxOGM5YzEwYjJkNThiYTdmMzRlYjY2YzNmMGEwODE5YSJ9 --- .../Google/Cloud/Datastream/V1/Datastream.php | Bin 0 -> 13298 bytes .../Datastream/V1/DatastreamResources.php | Bin 0 -> 17073 bytes .../Cloud/Datastream/V1/AvroFileFormat.php | 33 + .../Cloud/Datastream/V1/BackfillJob.php | 223 ++ .../Cloud/Datastream/V1/BackfillJob/State.php | 102 + .../Datastream/V1/BackfillJob/Trigger.php | 65 + .../V1/BigQueryDestinationConfig.php | 239 ++ .../BigQueryDestinationConfig/AppendOnly.php | 37 + .../V1/BigQueryDestinationConfig/Merge.php | 37 + .../SingleTargetDataset.php | 78 + .../SourceHierarchyDatasets.php | 81 + .../DatasetTemplate.php | 178 ++ .../Cloud/Datastream/V1/BigQueryProfile.php | 33 + .../Cloud/Datastream/V1/CdcStrategy.php | 144 + .../CdcStrategy/MostRecentStartPosition.php | 37 + .../NextAvailableStartPosition.php | 37 + .../V1/CdcStrategy/SpecificStartPosition.php | 144 + .../Cloud/Datastream/V1/ConnectionProfile.php | 539 ++++ .../V1/CreateConnectionProfileRequest.php | 309 ++ .../V1/CreatePrivateConnectionRequest.php | 271 ++ .../Datastream/V1/CreateRouteRequest.php | 237 ++ .../Datastream/V1/CreateStreamRequest.php | 309 ++ .../V1/DeleteConnectionProfileRequest.php | 155 + .../V1/DeletePrivateConnectionRequest.php | 193 ++ .../Datastream/V1/DeleteRouteRequest.php | 155 + .../Datastream/V1/DeleteStreamRequest.php | 155 + .../Cloud/Datastream/V1/DestinationConfig.php | 146 + .../V1/DiscoverConnectionProfileRequest.php | 365 +++ .../V1/DiscoverConnectionProfileResponse.php | 174 + .../src/Google/Cloud/Datastream/V1/Error.php | 217 ++ .../Datastream/V1/FetchStaticIpsRequest.php | 158 + .../Datastream/V1/FetchStaticIpsResponse.php | 105 + .../V1/ForwardSshTunnelConnectivity.php | 210 ++ .../Datastream/V1/GcsDestinationConfig.php | 228 ++ .../Google/Cloud/Datastream/V1/GcsProfile.php | 101 + .../V1/GetConnectionProfileRequest.php | 81 + .../V1/GetPrivateConnectionRequest.php | 81 + .../Cloud/Datastream/V1/GetRouteRequest.php | 81 + .../Datastream/V1/GetStreamObjectRequest.php | 81 + .../Cloud/Datastream/V1/GetStreamRequest.php | 81 + .../Cloud/Datastream/V1/JsonFileFormat.php | 101 + .../V1/JsonFileFormat/JsonCompression.php | 64 + .../V1/JsonFileFormat/SchemaFileFormat.php | 64 + .../V1/ListConnectionProfilesRequest.php | 237 ++ .../V1/ListConnectionProfilesResponse.php | 139 + .../V1/ListPrivateConnectionsRequest.php | 250 ++ .../V1/ListPrivateConnectionsResponse.php | 139 + .../Cloud/Datastream/V1/ListRoutesRequest.php | 245 ++ .../Datastream/V1/ListRoutesResponse.php | 139 + .../V1/ListStreamObjectsRequest.php | 169 + .../V1/ListStreamObjectsResponse.php | 101 + .../Datastream/V1/ListStreamsRequest.php | 237 ++ .../Datastream/V1/ListStreamsResponse.php | 139 + .../V1/LookupStreamObjectRequest.php | 112 + .../Cloud/Datastream/V1/MysqlColumn.php | 343 ++ .../Cloud/Datastream/V1/MysqlDatabase.php | 101 + .../Cloud/Datastream/V1/MysqlLogPosition.php | 111 + .../Cloud/Datastream/V1/MysqlProfile.php | 218 ++ .../Google/Cloud/Datastream/V1/MysqlRdbms.php | 67 + .../Cloud/Datastream/V1/MysqlSourceConfig.php | 276 ++ .../MysqlSourceConfig/BinaryLogPosition.php | 36 + .../Datastream/V1/MysqlSourceConfig/Gtid.php | 36 + .../Cloud/Datastream/V1/MysqlSslConfig.php | 257 ++ .../Google/Cloud/Datastream/V1/MysqlTable.php | 109 + .../Cloud/Datastream/V1/OperationMetadata.php | 355 +++ .../Cloud/Datastream/V1/OracleAsmConfig.php | 281 ++ .../Cloud/Datastream/V1/OracleColumn.php | 339 ++ .../Cloud/Datastream/V1/OracleProfile.php | 368 +++ .../Cloud/Datastream/V1/OracleRdbms.php | 67 + .../Cloud/Datastream/V1/OracleSchema.php | 101 + .../Cloud/Datastream/V1/OracleScnPosition.php | 67 + .../Datastream/V1/OracleSourceConfig.php | 347 ++ .../V1/OracleSourceConfig/BinaryLogParser.php | 111 + .../BinaryLogParser/LogFileDirectories.php | 104 + .../OracleAsmLogFileAccess.php | 36 + .../OracleSourceConfig/DropLargeObjects.php | 36 + .../V1/OracleSourceConfig/LogMiner.php | 36 + .../OracleSourceConfig/StreamLargeObjects.php | 36 + .../Cloud/Datastream/V1/OracleSslConfig.php | 109 + .../Cloud/Datastream/V1/OracleTable.php | 109 + .../Cloud/Datastream/V1/PostgresqlColumn.php | 305 ++ .../Cloud/Datastream/V1/PostgresqlProfile.php | 207 ++ .../Cloud/Datastream/V1/PostgresqlRdbms.php | 67 + .../Cloud/Datastream/V1/PostgresqlSchema.php | 101 + .../Datastream/V1/PostgresqlSourceConfig.php | 239 ++ .../Cloud/Datastream/V1/PostgresqlTable.php | 109 + .../Cloud/Datastream/V1/PrivateConnection.php | 350 ++ .../Datastream/V1/PrivateConnection/State.php | 85 + .../Datastream/V1/PrivateConnectivity.php | 71 + .../src/Google/Cloud/Datastream/V1/Route.php | 292 ++ .../Cloud/Datastream/V1/RunStreamRequest.php | 153 + .../Cloud/Datastream/V1/SourceConfig.php | 212 ++ .../Datastream/V1/SourceObjectIdentifier.php | 174 + .../MysqlObjectIdentifier.php | 104 + .../OracleObjectIdentifier.php | 104 + .../PostgresqlObjectIdentifier.php | 104 + .../SqlServerObjectIdentifier.php | 104 + .../Datastream/V1/SqlServerChangeTables.php | 33 + .../Cloud/Datastream/V1/SqlServerColumn.php | 305 ++ .../Datastream/V1/SqlServerLsnPosition.php | 67 + .../Cloud/Datastream/V1/SqlServerProfile.php | 208 ++ .../Cloud/Datastream/V1/SqlServerRdbms.php | 67 + .../Cloud/Datastream/V1/SqlServerSchema.php | 101 + .../Datastream/V1/SqlServerSourceConfig.php | 264 ++ .../Cloud/Datastream/V1/SqlServerTable.php | 109 + .../V1/SqlServerTransactionLogs.php | 33 + .../Datastream/V1/StartBackfillJobRequest.php | 86 + .../V1/StartBackfillJobResponse.php | 77 + .../V1/StaticServiceIpConnectivity.php | 35 + .../Datastream/V1/StopBackfillJobRequest.php | 87 + .../Datastream/V1/StopBackfillJobResponse.php | 77 + .../src/Google/Cloud/Datastream/V1/Stream.php | 561 ++++ .../V1/Stream/BackfillAllStrategy.php | 178 ++ .../V1/Stream/BackfillNoneStrategy.php | 36 + .../Cloud/Datastream/V1/Stream/State.php | 109 + .../Cloud/Datastream/V1/StreamObject.php | 311 ++ .../V1/UpdateConnectionProfileRequest.php | 302 ++ .../Datastream/V1/UpdateStreamRequest.php | 302 ++ .../Google/Cloud/Datastream/V1/Validation.php | 169 + .../Cloud/Datastream/V1/Validation/State.php | 78 + .../Cloud/Datastream/V1/ValidationMessage.php | 169 + .../Datastream/V1/ValidationMessage/Level.php | 64 + .../Cloud/Datastream/V1/ValidationResult.php | 71 + .../Cloud/Datastream/V1/VpcPeeringConfig.php | 106 + .../create_connection_profile.php | 98 + .../create_private_connection.php | 98 + .../V1/DatastreamClient/create_route.php | 103 + .../V1/DatastreamClient/create_stream.php | 126 + .../delete_connection_profile.php | 84 + .../delete_private_connection.php | 84 + .../V1/DatastreamClient/delete_route.php | 85 + .../V1/DatastreamClient/delete_stream.php | 80 + .../discover_connection_profile.php | 75 + .../V1/DatastreamClient/fetch_static_ips.php | 77 + .../get_connection_profile.php | 75 + .../V1/DatastreamClient/get_location.php | 57 + .../get_private_connection.php | 75 + .../samples/V1/DatastreamClient/get_route.php | 76 + .../V1/DatastreamClient/get_stream.php | 71 + .../V1/DatastreamClient/get_stream_object.php | 76 + .../list_connection_profiles.php | 77 + .../V1/DatastreamClient/list_locations.php | 62 + .../list_private_connections.php | 78 + .../V1/DatastreamClient/list_routes.php | 81 + .../DatastreamClient/list_stream_objects.php | 76 + .../V1/DatastreamClient/list_streams.php | 76 + .../DatastreamClient/lookup_stream_object.php | 74 + .../V1/DatastreamClient/run_stream.php | 85 + .../DatastreamClient/start_backfill_job.php | 77 + .../V1/DatastreamClient/stop_backfill_job.php | 77 + .../update_connection_profile.php | 84 + .../V1/DatastreamClient/update_stream.php | 115 + .../v1/src/V1/Client/DatastreamClient.php | 1187 +++++++ .../Datastream/v1/src/V1/gapic_metadata.json | 158 + .../resources/datastream_client_config.json | 184 ++ .../datastream_descriptor_config.php | 510 +++ .../datastream_rest_client_config.php | 411 +++ .../Unit/V1/Client/DatastreamClientTest.php | 2817 +++++++++++++++++ 158 files changed, 26447 insertions(+) create mode 100644 owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/Datastream.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/DatastreamResources.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/AvroFileFormat.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlLogPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleAsmConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleScnPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSslConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/RunStreamRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerChangeTables.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerColumn.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerLsnPosition.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerProfile.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerRdbms.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSchema.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSourceConfig.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTable.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTransactionLogs.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php create mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/run_stream.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php create mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php create mode 100644 owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php create mode 100644 owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json create mode 100644 owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php create mode 100644 owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php create mode 100644 owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/Datastream.php b/owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/Datastream.php new file mode 100644 index 0000000000000000000000000000000000000000..a55c2007c82933f17c2f06e4fec4ee88e9d187db GIT binary patch literal 13298 zcmcIrPi)+16|a*fn|$fE%@>+XQ?={5t2Ry38Im^J#cj7tk~VFXwoy{5T^MQb%s7du zW4pE|-B5A>B+f_(A>g(`99AIE3M4LYK`WL@aA1XiazSVhz=b;}-uKVr8GF9*OtU?- zyW{uX_x}F;-m`t}hPUORGwQPGn7$F3HMO#UEOruP1`I~ZMR-4)Qr#wLfqGw2jKVH3JTU9j(jS&8M z-3rQO4P|h_g1-DW;>YCzQOdhJM|QpRTID z8P4e?!+_Fr&wqR}J``7^y`jeIh&;i9?AUfycQ(`gyQD57w%^FK*UNtc+UtP z_rUwmg7OKCZ7-dd=I+I}ES{;wS}jVYPh<3q^ zqRoj;a3Ts!P~QcU#FJkXpcY+Znr}nYIE64Pq6kH37=iZTL8LBOLDk(c{YBStOo};> z1sf2FHS1ezQ=yivF9@|Fc9u6+q zH+W)m0VWl2R>psikPG%@bkuW$a1+uclCeQ$T#(6Fjd+BhTj(f}5STv1mMgPK1x?EY ztv|8XDGQggFoXs}!-w0)!U!6U+_vy48X@5?yOpm%(rCZ!L#HK)6nKF9=1Y6`z{`2} z0Ny9>9>DwK-2<&|e2R|UGQ;ZDI&B#4c!8+FE9fB2ZdQTkX$77^r){^&?hZVpQ30;- z3wRU_d&Z_&4xr=6^+EgxFh+>}6uOU1hZe=Kb`y=a9?W9~)T}iqTV4PN&_6YdC(sec zd^aq|#1PTL+D{d9a>WY5M9oHq>(`(fD!aJ>s_zdJ zbgG@c-2S_0ED1Ht5#0h;TfgBkG*Wk8w7gxoAzJGkuP|JyseWiL-;5~ncRHo zZE|F8QoyXZ`{tvjiXE12F)5_|u$XwRoyEi(trnAl;1+)komw(&Q)2MT=N{BTJU$dY zs9Ut}DF~CAT&ELS1RQU+bRkm|12wF+??RY_j1ZUsE#5_AO^R`ZxP)F|)1*KJO+-GW z2hDS(+CgYK6x>Be0SXwasLVH->YuvQcAIVOtzaAWup;fzo|mZ14K&6ov)P;;Q=xqgzNet0YjtOTPFX;Q zs zC@@%Q^4t>lqRbI#+nj2D>_el`9!ji3F+gaQwvJ`8RA}4tM9UzOr~P;q4Vg}ju`m!# zwn;54V`2bhqY9HViVnh9TWR!l{rCj&fDzV%GOV8hn0Z)_&*;yfao!D@wQ|*feX4EK z$*Ixl^~1(s1O})w2o7N5mU~5XQ2nsI809@9Tp+8Qx*g_*;QGkij4b6Ju|^Y^)+i5E zM*CLOcCY%@PE%tkinfQgJ0T0UB*#2x0G1hoz_~5 zaWNq)Dy@C-!@iG;Y5MXygmE$HPf?8BIkas>ruT^7hB<{b2MP5=R(0LBCnUARx6!sY zMyJ>fnoY0?A^WF}_6rymSTnok*28FJ37uLKBA3q57T`2~t$hnX1>j?7$S0CoTG@Ft zK!4_yaavaNRFJ$HwC^ftlz=&>umTEdhx8DMT69Qk;t9x?=pF72(#R! z2a5!mZ))R25K+esRe^t;p320(R5a7?rk|mvoJ77}p zg_XrjTYgdGMevP}Klx7IoA?d#wDTFOi|eqIAdB0eFkOh2h=u9BLgPlkp8^E% zZ4rg9$h1r25N1hnFyTS%=8GcTem2=b)}d{zNHGFT!$0an6AUX7M_{R=+b{`hP6{`~ z9_8eth6#3}&x>c#X!6WtQ}v=)VBwi*gh4zjN%;vdin?S)>oK%?$}<`KV{lWOeV5!# zZJ08;>1W-z=~Rk;VjDQ>mGayjn(#@|eAl^?>ZpGyXrj%YOzx;QOc@>JKQB(BWBh?x zv|FSPdU0Ax#Y$(IHLN{6RaK#ANeypHF3^&;h1xtMsrxY4?fYso6@dO&=!qf78fp z#?w0AW8y!9Rq=hI+^RTbMyu+btis%!RvV}A zw<}JW(XP#&LF?i)i&VzE`v7Vp+FZ(OA|lIZ!`t%MP#n6f6=)c;X{*C)J_L7usnEWZ z`JQcduyhp|l`|t224r6LXiM?ZzJlkoD_wBuGLfVY{tbCllUS7Ec_|Dg=)2c`nfkh@ zUF(dNg+{gu&2^iqKpg)OAH(9F5AbEF{>c>_eNARkZgrB2-vVwm-vUG|q-}bNQTXq$ zvTxnf;!841TB$`Gq~<4?xE-Yu7{YRcM(3V(n?{HI)UH#Hq9cMsPzly}O`B{IslPyp zw5)aICDKAHjO*Z$)V;CxrDoGswB_DSYdV2g_A3P)ZhrRy&&tBqOe^e?!bK|!57~`4 z2+ZNnb^?JteWU5+l-NX-*zw3aV0OPxFbQKi-1_-Mm0(Y8f5k-QB{rcm$)7}fka42o z0ve-TpyQ-aF+i`jE_*u;&|;Oc&W=0?N}BXBQv9Ek%m>^PDgSm_+2)3PL2&skQ-@7I%YADBN*KWn$q06nzO(TWxMQg#Pk|Bh7+6 zZUX)rWE86d=5MJ+F+yQMha!2_^XyQZe%aVe-g{m=-u9WnpNjddF!TbwPIB>)X~ zH)t~sr)sK_${cdaAvJSPRi;uibI2i=9CA&ZW6r5^a!6HNmE@YrW%9kH7i>*XQsRm( z0vqpr?|=XM_xCs6dAD=ip>Jh3jkaOyu2IicPqXf^k?q))Yt^h~w%R>9GVE;4YIV$} zVdt{h_5JMLekEI6->$rfsgBjPYsPA}VOfo)v0Q6f-THD}cXh|L4ZXE|awqhcW*cI> zljAE8we^vj3;Ti)wT=&5aAKtl3RBP&vlMS98c$oABW$~}m ztv1bC)^T+g|9#tZG_!5GrrtDv9~-=vJ<^+w0i40HN8NVKHLZ4*P1tYOjN30~1tuH& z?T!V8+{=2@l^Bn}pTq68YuIhQdAM#kHQVgCmR-Wo)zyaK`kZA?Zoe#-WpL(E_O_sL zb#;Kqds)}+8sXKmS=(^CcKa@;n*p5ppALucF5fW^H%y~hFBr%AiD}uZtHG`UkWo`T zrj9?$XUBRMq698J!PJTgX>j#cXZT!x0bdT(%(@%XP^L`TYz1-@D#^#Q^o+CTM=& z)@w}z+&sdTlq)oIY&kAdlXNT_yFFW&_$nV)=4i5G*={o5_-pow4*9(SNB zpILT2J?TA;DK{y_c2w0JL&K~Svu30d-q&%ZN>^%DyKQhy&~(?e&1%;*ob*(7;&yUn zEjOAsxgOecYd%cgM=7>l`&9V>Em?eZbl)Q>*z z{&RZzLw`Ef|9On&c2Av8o6kba(gRvH1*!ZhKdIa&3hk7sSaRieq8Q3)@}*lnqoopb zzX2=rY)Bnp5b)SD2q8nD{sE=RpEk>|5QhCM7YuKl9s(O=dlzAw?b^=?s-SKqx#B@*9U&iS94a@#ax9er+ zxYC8?W7dV+KQ>^LPKFhbS>Zmz%*=2?xfYU*x;JQY>p3Mu$&PKFAmq}RkuXBv6|T`0 zy^A2Mjqrs#QmtjU$5vham{JcrwUS}jX1gJbmhuKooOEiED~B(^H~e@0MS6k7YcSeU z*x;(193Cz287{oRV@Cl$oo=-aeg?FwUnL-Lf+~*#R$GDb>GeJnSTqR}$%tnTj6)<> zGM;32WL%W%z%@N-CkIE{bGwS`7*>N-=u_L+mdt3Qo> zo&O2F5{jloB;iZv!09Rbkfle6M4aU>s+T^yAa{(KTc5Mz=8&T)9Q1tPkmmC5++XZxGIySOLYY6 zW?R@Oyb0%Qibgh!X$* zO#L!O3%x!X79RPi30uwWxF4ZUDmQ2$_yUoau(UHm-CrO@epxeY*F0i|J`}o7D&L~3 zg9A7U3*;pVTSC{u2);#|RM-+dU-H@Pbi{0R-wQwefP>TAGbix2qX3!vkbr+UOG|+Q zmSh6+|H*v}P(Q9NtkHtZXCQ$rZ%Yf){c@DH^(0G(3GPv{QFAm8fyD&LmG4F&1OXDJ z=V`vhVp<>Ihy&b?0tg4efY_u|)ogsqq9-4v!BHZ!vc8B5KtF&z^&?jw>X<`CTA+b= z7hvy`!nVbd7o=kzdrS@%=^Oi_S723<-tl0N!yy{f%#LsJnJY;D9n<0D%J-t!#yqB3 z8yZh;#gvaJeIx=(WVgq?=zlNJ-;P3$ibernqRaihiWB~&fL@M*9^(79Vi&c>=lbyh zH5%WK2i{lO4;bIznRobSg;|=Gf>2nXId25xgZkGTRL=yh4jqP&9GtZZW944CbE*m3{vqF>M`(|P*lr7T@ov>l0riLgpz{p3LDNA zM3DybxKmNy^G%G{jDxV7#lw;M9p(e@C11+5W22?BO*{OPT;V>=TcRk#*Yy@Sd?`wz zLKMTJ$PFCSt1Tx)u~^2zI%85SC{+Juh7_?tnOB)1Sg85{c+qUvn%%mgSydh$@*N~s z#v#?CZPEC=7lL`Ri$G*4-O@j2>Rs#FHj4mi^_qsd_hUy&(Rb)(--xPSdkpu`l*5=W zPrzO%b=&G_P2Fw;I}#4$-Sc@LW=(D#KsyX)UoZwHPp8YG6yLXia1Z$lE>PxG{k|o3 zXtrrJw3dlmgtTxNk@j=&OmjO{W0y^bf%}M-s?ZPU5d-b$HY|Ty_>TJ*q_)6ufL-D! zuyqQh`gxSOOv>Q4GDI^TQJFuPV08sXlaHl*K^dtothB~RWsYCdYc&=I3uFA?>FAa9 zR8-io>;};D92|%GDP8tgteY@ZC{miJ(F!5{;3=1ttE~sXThC?EbXA;NKRKDhLsAB( zC@<1wtKGz*a^`qc%8Dq9gX1jB)$Q7`d4d8f+fOhkC`%Mj)A9EzxLW`%J=&rj>+L$0 zY82)Wk3$V*#RSEjR1i}9Z~B9$w*HT3F`#s)2iWQfs(QUZWE>RW3J$1`!dw~Q4K`>A z{z(=eVXxqcJdY3=3IJDl z8SW=8gp#F{ZFF!cDN<#pX}R*A2BqToSNQ}h(2HwJJ|eiSi7V$i5gw1Ie-WcaKi>U6 z6m*_Y_Jlbi@EI27umC85D&~Su=ukO-ho*alJCfHvmXz&}Lwpz^+N(6xBhQgFc^_Yh z^InL0AtE5RSA@qSS4!}oP0$s8i5>x78zsQwkt>J;$Z+|+2*@*wbV`(RZN2U2;%*UE z-QlJ0@`cbB zXi;E!Yj~MQWI3jXLiN`Zw8WqE=;XVjbn<*c1!({nu8-paJTqPVgf4}nY%diRRj0_b zV}LEWAT*XR(98l&He9ow77Do%rI3Swo0y4^^Aar$Kxd|Cl6~E$uKzGWb3I4(kghvC zY4i&)R@44Cp>Wo z7SK8+rS-~wy}S(o3Hd; zzA3b@x37hU;R+6SYx#!0qtrGsL*yp7MjcY6Xp^gZBb zpj{tsmr`-{=W)7>0yBErygMFQeqp^w?8aTxrQmgrSl)|EUlHB5s+?m9<@+mm(#6*+FRa>uVk;UVHk zcPY^_z>f5<#n4C%9nFPZhJhl{kI>Q7=@{+0h8n|Z`Zogfy(imgo+Ir82o<82>CzBZ zE4c2K=cvJ}aoNxOdyK9Li#EU|2C(!Mh4GD6Ryo%1l#&pGE=J z+QSj{oB8I?Y!jUxEvs&*e;cQzK{fe^ZiR1$G1Kcgl$Cu+>JxeC1G>uY()tz%{Pgce zoxw1x2dPJy>qgbP9vgxz49lBQ$Rp(%Hs%Ih4}CV1@*(FJakEuSD}cUfXILGPI7YwD$q- zVOj|BEt=xZN)B$I*v-ti-AZ@RVAe%nEDXAAldWsG4YN->>^h5Ie-W6)TjCO1v7g0a z%3V^>w(sHvfSQGC+*8pxHqTGxyw0)AzsBj(5T4*>_?nExWl{xi@MIT4VDA=P6@mBw zmN466W@tbm_D663`(v|y z#$iqBloGZsw2ZKFTaoUGX9WFtIbMk9e~MMwbR}d5LrVz@7@3xg*im2@hpg8^;uRDr zLhA|Zxbp;C^Nr@{P@2(DYR*1Mn@%lL!qeZuPrbwC5I~pIRKv#yI0So+@ zd_Jx5_LaK|7d@6pi(<3$Z*e8d2V&c|MaRpM0JWuQBF%(N^Lj z(UywN*XSPYVa~Kv+*|jZX@0G;{ji8OZS-%KEBmDqJZrBbou^q=2SNuozM4{ih*Hsm zQfZ&N=V|pGO?!;HMwcoF+nbxkgT8VSF!B#7`zT{=ufe0EJsckSL4F6dq<_K|c(*%i zI>MU+sL6=zj-}N+1l77-q}5zCu=+G!19b5AmAEBUa^9fv*sZ)v({;Q`YT~5^uV=-UxN5!=VBIpa=AdoR%S;Tx0(;wy!c)T{L{sz^9!KFhoBDhhYMAJAi zn$jLbzQHj7m)l`em0g-a;|PBR8Is2s5?Q4hgz;Wr=2Fzlp3E{X!6dl&`aGd}ixPq? zyqd97d|2G+)3*?pV#+KO?BHPk0Lu1P2}-WjYX~HH z<~m&)vGvUJlo?HC=1=3eEFOl;`kF-$#=4vO z&Lgr7hWmP4fP2gb-*JoN-AdJP&E*}g;C7@|%S)+RJA_sSPlG_J>4XpkPb14`ei*Ui zgg^`Er}OAy6+_{7y(j8zx;$(iZi*+czAOc@s-^lJS{k644RdN@*aVMp)DJ1u&nHm_ z6@7XkMCBIE^&A1SrwJ+1s9h8mX((9~5&vQBW10E8wml<8F z6#MYLDExcxQRBV5h86megk@x+J-?dJsoo8;luq?8google.cloud.datastream.v1.AvroFileFormat + */ +class AvroFileFormat extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php new file mode 100644 index 000000000000..b10e512e8005 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php @@ -0,0 +1,223 @@ +google.cloud.datastream.v1.BackfillJob + */ +class BackfillJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Backfill job state. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Backfill job's triggering reason. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.Trigger trigger = 2; + */ + protected $trigger = 0; + /** + * Output only. Backfill job's start time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_start_time = null; + /** + * Output only. Backfill job's end time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_end_time = null; + /** + * Output only. Errors which caused the backfill job to fail. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. Backfill job state. + * @type int $trigger + * Backfill job's triggering reason. + * @type \Google\Protobuf\Timestamp $last_start_time + * Output only. Backfill job's start time. + * @type \Google\Protobuf\Timestamp $last_end_time + * Output only. Backfill job's end time. + * @type array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. Errors which caused the backfill job to fail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Backfill job state. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Backfill job state. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\BackfillJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Backfill job's triggering reason. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.Trigger trigger = 2; + * @return int + */ + public function getTrigger() + { + return $this->trigger; + } + + /** + * Backfill job's triggering reason. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.Trigger trigger = 2; + * @param int $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\BackfillJob\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * Output only. Backfill job's start time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastStartTime() + { + return $this->last_start_time; + } + + public function hasLastStartTime() + { + return isset($this->last_start_time); + } + + public function clearLastStartTime() + { + unset($this->last_start_time); + } + + /** + * Output only. Backfill job's start time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_start_time = $var; + + return $this; + } + + /** + * Output only. Backfill job's end time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastEndTime() + { + return $this->last_end_time; + } + + public function hasLastEndTime() + { + return isset($this->last_end_time); + } + + public function clearLastEndTime() + { + unset($this->last_end_time); + } + + /** + * Output only. Backfill job's end time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_end_time = $var; + + return $this; + } + + /** + * Output only. Errors which caused the backfill job to fail. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. Errors which caused the backfill job to fail. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Error::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php new file mode 100644 index 000000000000..63ca32bd1a86 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php @@ -0,0 +1,102 @@ +google.cloud.datastream.v1.BackfillJob.State + */ +class State +{ + /** + * Default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Backfill job was never started for the stream object (stream has backfill + * strategy defined as manual or object was explicitly excluded from + * automatic backfill). + * + * Generated from protobuf enum NOT_STARTED = 1; + */ + const NOT_STARTED = 1; + /** + * Backfill job will start pending available resources. + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + /** + * Backfill job is running. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + /** + * Backfill job stopped (next job run will start from beginning). + * + * Generated from protobuf enum STOPPED = 4; + */ + const STOPPED = 4; + /** + * Backfill job failed (due to an error). + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * Backfill completed successfully. + * + * Generated from protobuf enum COMPLETED = 6; + */ + const COMPLETED = 6; + /** + * Backfill job failed since the table structure is currently unsupported + * for backfill. + * + * Generated from protobuf enum UNSUPPORTED = 7; + */ + const UNSUPPORTED = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::NOT_STARTED => 'NOT_STARTED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + self::STOPPED => 'STOPPED', + self::FAILED => 'FAILED', + self::COMPLETED => 'COMPLETED', + self::UNSUPPORTED => 'UNSUPPORTED', + ]; + + 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(State::class, \Google\Cloud\Datastream\V1\BackfillJob_State::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php new file mode 100644 index 000000000000..319f4397a85e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php @@ -0,0 +1,65 @@ +google.cloud.datastream.v1.BackfillJob.Trigger + */ +class Trigger +{ + /** + * Default value. + * + * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; + */ + const TRIGGER_UNSPECIFIED = 0; + /** + * Object backfill job was triggered automatically according to the stream's + * backfill strategy. + * + * Generated from protobuf enum AUTOMATIC = 1; + */ + const AUTOMATIC = 1; + /** + * Object backfill job was triggered manually using the dedicated API. + * + * Generated from protobuf enum MANUAL = 2; + */ + const MANUAL = 2; + + private static $valueToName = [ + self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', + self::AUTOMATIC => 'AUTOMATIC', + self::MANUAL => 'MANUAL', + ]; + + 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(Trigger::class, \Google\Cloud\Datastream\V1\BackfillJob_Trigger::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php new file mode 100644 index 000000000000..af848464cd9d --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php @@ -0,0 +1,239 @@ +google.cloud.datastream.v1.BigQueryDestinationConfig + */ +class BigQueryDestinationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The guaranteed data freshness (in seconds) when querying tables created by + * the stream. Editing this field will only affect new tables created in the + * future, but existing tables will not be impacted. Lower values mean that + * queries will return fresher data, but may result in higher cost. + * + * Generated from protobuf field .google.protobuf.Duration data_freshness = 300; + */ + protected $data_freshness = null; + protected $dataset_config; + protected $write_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset $single_target_dataset + * Single destination dataset. + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets $source_hierarchy_datasets + * Source hierarchy datasets. + * @type \Google\Protobuf\Duration $data_freshness + * The guaranteed data freshness (in seconds) when querying tables created by + * the stream. Editing this field will only affect new tables created in the + * future, but existing tables will not be impacted. Lower values mean that + * queries will return fresher data, but may result in higher cost. + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge $merge + * The standard mode + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly $append_only + * Append only mode + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Single destination dataset. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset single_target_dataset = 201; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset|null + */ + public function getSingleTargetDataset() + { + return $this->readOneof(201); + } + + public function hasSingleTargetDataset() + { + return $this->hasOneof(201); + } + + /** + * Single destination dataset. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset single_target_dataset = 201; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset $var + * @return $this + */ + public function setSingleTargetDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset::class); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * Source hierarchy datasets. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets source_hierarchy_datasets = 202; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets|null + */ + public function getSourceHierarchyDatasets() + { + return $this->readOneof(202); + } + + public function hasSourceHierarchyDatasets() + { + return $this->hasOneof(202); + } + + /** + * Source hierarchy datasets. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets source_hierarchy_datasets = 202; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets $var + * @return $this + */ + public function setSourceHierarchyDatasets($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets::class); + $this->writeOneof(202, $var); + + return $this; + } + + /** + * The guaranteed data freshness (in seconds) when querying tables created by + * the stream. Editing this field will only affect new tables created in the + * future, but existing tables will not be impacted. Lower values mean that + * queries will return fresher data, but may result in higher cost. + * + * Generated from protobuf field .google.protobuf.Duration data_freshness = 300; + * @return \Google\Protobuf\Duration|null + */ + public function getDataFreshness() + { + return $this->data_freshness; + } + + public function hasDataFreshness() + { + return isset($this->data_freshness); + } + + public function clearDataFreshness() + { + unset($this->data_freshness); + } + + /** + * The guaranteed data freshness (in seconds) when querying tables created by + * the stream. Editing this field will only affect new tables created in the + * future, but existing tables will not be impacted. Lower values mean that + * queries will return fresher data, but may result in higher cost. + * + * Generated from protobuf field .google.protobuf.Duration data_freshness = 300; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDataFreshness($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->data_freshness = $var; + + return $this; + } + + /** + * The standard mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.Merge merge = 301; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge|null + */ + public function getMerge() + { + return $this->readOneof(301); + } + + public function hasMerge() + { + return $this->hasOneof(301); + } + + /** + * The standard mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.Merge merge = 301; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge $var + * @return $this + */ + public function setMerge($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge::class); + $this->writeOneof(301, $var); + + return $this; + } + + /** + * Append only mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly append_only = 302; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly|null + */ + public function getAppendOnly() + { + return $this->readOneof(302); + } + + public function hasAppendOnly() + { + return $this->hasOneof(302); + } + + /** + * Append only mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly append_only = 302; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly $var + * @return $this + */ + public function setAppendOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly::class); + $this->writeOneof(302, $var); + + return $this; + } + + /** + * @return string + */ + public function getDatasetConfig() + { + return $this->whichOneof("dataset_config"); + } + + /** + * @return string + */ + public function getWriteMode() + { + return $this->whichOneof("write_mode"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php new file mode 100644 index 000000000000..59b3c8429b74 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php @@ -0,0 +1,37 @@ +google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly + */ +class AppendOnly extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AppendOnly::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_AppendOnly::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php new file mode 100644 index 000000000000..44303457fb94 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php @@ -0,0 +1,37 @@ +google.cloud.datastream.v1.BigQueryDestinationConfig.Merge + */ +class Merge extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Merge::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_Merge::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php new file mode 100644 index 000000000000..3402469aa10e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php @@ -0,0 +1,78 @@ +google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset + */ +class SingleTargetDataset extends \Google\Protobuf\Internal\Message +{ + /** + * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. + * + * Generated from protobuf field string dataset_id = 1; + */ + protected $dataset_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset_id + * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. + * + * Generated from protobuf field string dataset_id = 1; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. + * + * Generated from protobuf field string dataset_id = 1; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SingleTargetDataset::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_SingleTargetDataset::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php new file mode 100644 index 000000000000..fbd540e1fc76 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php @@ -0,0 +1,81 @@ +google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets + */ +class SourceHierarchyDatasets extends \Google\Protobuf\Internal\Message +{ + /** + * The dataset template to use for dynamic dataset creation. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2; + */ + protected $dataset_template = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate $dataset_template + * The dataset template to use for dynamic dataset creation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * The dataset template to use for dynamic dataset creation. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate|null + */ + public function getDatasetTemplate() + { + return $this->dataset_template; + } + + public function hasDatasetTemplate() + { + return isset($this->dataset_template); + } + + public function clearDatasetTemplate() + { + unset($this->dataset_template); + } + + /** + * The dataset template to use for dynamic dataset creation. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate $var + * @return $this + */ + public function setDatasetTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate::class); + $this->dataset_template = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SourceHierarchyDatasets::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_SourceHierarchyDatasets::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php new file mode 100644 index 000000000000..e0cd51177152 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php @@ -0,0 +1,178 @@ +google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate + */ +class DatasetTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $location = ''; + /** + * If supplied, every created dataset will have its name prefixed by the + * provided value. The prefix and name will be separated by an underscore. + * i.e. _. + * + * Generated from protobuf field string dataset_id_prefix = 2; + */ + protected $dataset_id_prefix = ''; + /** + * Describes the Cloud KMS encryption key that will be used to + * protect destination BigQuery table. The BigQuery Service Account + * associated with your project requires access to this encryption key. + * i.e. + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. + * See https://cloud.google.com/bigquery/docs/customer-managed-encryption + * for more information. + * + * Generated from protobuf field string kms_key_name = 3; + */ + protected $kms_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * @type string $dataset_id_prefix + * If supplied, every created dataset will have its name prefixed by the + * provided value. The prefix and name will be separated by an underscore. + * i.e. _. + * @type string $kms_key_name + * Describes the Cloud KMS encryption key that will be used to + * protect destination BigQuery table. The BigQuery Service Account + * associated with your project requires access to this encryption key. + * i.e. + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. + * See https://cloud.google.com/bigquery/docs/customer-managed-encryption + * for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The geographic location where the dataset should reside. See + * https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * If supplied, every created dataset will have its name prefixed by the + * provided value. The prefix and name will be separated by an underscore. + * i.e. _. + * + * Generated from protobuf field string dataset_id_prefix = 2; + * @return string + */ + public function getDatasetIdPrefix() + { + return $this->dataset_id_prefix; + } + + /** + * If supplied, every created dataset will have its name prefixed by the + * provided value. The prefix and name will be separated by an underscore. + * i.e. _. + * + * Generated from protobuf field string dataset_id_prefix = 2; + * @param string $var + * @return $this + */ + public function setDatasetIdPrefix($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id_prefix = $var; + + return $this; + } + + /** + * Describes the Cloud KMS encryption key that will be used to + * protect destination BigQuery table. The BigQuery Service Account + * associated with your project requires access to this encryption key. + * i.e. + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. + * See https://cloud.google.com/bigquery/docs/customer-managed-encryption + * for more information. + * + * Generated from protobuf field string kms_key_name = 3; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Describes the Cloud KMS encryption key that will be used to + * protect destination BigQuery table. The BigQuery Service Account + * associated with your project requires access to this encryption key. + * i.e. + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. + * See https://cloud.google.com/bigquery/docs/customer-managed-encryption + * for more information. + * + * Generated from protobuf field string kms_key_name = 3; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatasetTemplate::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php new file mode 100644 index 000000000000..09c6d5d4b837 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php @@ -0,0 +1,33 @@ +google.cloud.datastream.v1.BigQueryProfile + */ +class BigQueryProfile extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy.php new file mode 100644 index 000000000000..a6009b7b5055 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy.php @@ -0,0 +1,144 @@ +google.cloud.datastream.v1.CdcStrategy + */ +class CdcStrategy extends \Google\Protobuf\Internal\Message +{ + protected $start_position; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\CdcStrategy\MostRecentStartPosition $most_recent_start_position + * Optional. Start replicating from the most recent position in the source. + * @type \Google\Cloud\Datastream\V1\CdcStrategy\NextAvailableStartPosition $next_available_start_position + * Optional. Resume replication from the next available position in the + * source. + * @type \Google\Cloud\Datastream\V1\CdcStrategy\SpecificStartPosition $specific_start_position + * Optional. Start replicating from a specific position in the source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Start replicating from the most recent position in the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition most_recent_start_position = 101 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\CdcStrategy\MostRecentStartPosition|null + */ + public function getMostRecentStartPosition() + { + return $this->readOneof(101); + } + + public function hasMostRecentStartPosition() + { + return $this->hasOneof(101); + } + + /** + * Optional. Start replicating from the most recent position in the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition most_recent_start_position = 101 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\CdcStrategy\MostRecentStartPosition $var + * @return $this + */ + public function setMostRecentStartPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\CdcStrategy\MostRecentStartPosition::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Optional. Resume replication from the next available position in the + * source. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition next_available_start_position = 102 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\CdcStrategy\NextAvailableStartPosition|null + */ + public function getNextAvailableStartPosition() + { + return $this->readOneof(102); + } + + public function hasNextAvailableStartPosition() + { + return $this->hasOneof(102); + } + + /** + * Optional. Resume replication from the next available position in the + * source. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition next_available_start_position = 102 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\CdcStrategy\NextAvailableStartPosition $var + * @return $this + */ + public function setNextAvailableStartPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\CdcStrategy\NextAvailableStartPosition::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Optional. Start replicating from a specific position in the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition specific_start_position = 103 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\CdcStrategy\SpecificStartPosition|null + */ + public function getSpecificStartPosition() + { + return $this->readOneof(103); + } + + public function hasSpecificStartPosition() + { + return $this->hasOneof(103); + } + + /** + * Optional. Start replicating from a specific position in the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition specific_start_position = 103 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\CdcStrategy\SpecificStartPosition $var + * @return $this + */ + public function setSpecificStartPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\CdcStrategy\SpecificStartPosition::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * @return string + */ + public function getStartPosition() + { + return $this->whichOneof("start_position"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php new file mode 100644 index 000000000000..da43a6c9ae9a --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php @@ -0,0 +1,37 @@ +google.cloud.datastream.v1.CdcStrategy.MostRecentStartPosition + */ +class MostRecentStartPosition extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MostRecentStartPosition::class, \Google\Cloud\Datastream\V1\CdcStrategy_MostRecentStartPosition::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php new file mode 100644 index 000000000000..d26b5b70fb49 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php @@ -0,0 +1,37 @@ +google.cloud.datastream.v1.CdcStrategy.NextAvailableStartPosition + */ +class NextAvailableStartPosition extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NextAvailableStartPosition::class, \Google\Cloud\Datastream\V1\CdcStrategy_NextAvailableStartPosition::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php new file mode 100644 index 000000000000..db07650754a9 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php @@ -0,0 +1,144 @@ +google.cloud.datastream.v1.CdcStrategy.SpecificStartPosition + */ +class SpecificStartPosition extends \Google\Protobuf\Internal\Message +{ + protected $position; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\MysqlLogPosition $mysql_log_position + * MySQL specific log position to start replicating from. + * @type \Google\Cloud\Datastream\V1\OracleScnPosition $oracle_scn_position + * Oracle SCN to start replicating from. + * @type \Google\Cloud\Datastream\V1\SqlServerLsnPosition $sql_server_lsn_position + * SqlServer LSN to start replicating from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * MySQL specific log position to start replicating from. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlLogPosition mysql_log_position = 101; + * @return \Google\Cloud\Datastream\V1\MysqlLogPosition|null + */ + public function getMysqlLogPosition() + { + return $this->readOneof(101); + } + + public function hasMysqlLogPosition() + { + return $this->hasOneof(101); + } + + /** + * MySQL specific log position to start replicating from. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlLogPosition mysql_log_position = 101; + * @param \Google\Cloud\Datastream\V1\MysqlLogPosition $var + * @return $this + */ + public function setMysqlLogPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlLogPosition::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Oracle SCN to start replicating from. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleScnPosition oracle_scn_position = 102; + * @return \Google\Cloud\Datastream\V1\OracleScnPosition|null + */ + public function getOracleScnPosition() + { + return $this->readOneof(102); + } + + public function hasOracleScnPosition() + { + return $this->hasOneof(102); + } + + /** + * Oracle SCN to start replicating from. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleScnPosition oracle_scn_position = 102; + * @param \Google\Cloud\Datastream\V1\OracleScnPosition $var + * @return $this + */ + public function setOracleScnPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleScnPosition::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * SqlServer LSN to start replicating from. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerLsnPosition sql_server_lsn_position = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerLsnPosition|null + */ + public function getSqlServerLsnPosition() + { + return $this->readOneof(103); + } + + public function hasSqlServerLsnPosition() + { + return $this->hasOneof(103); + } + + /** + * SqlServer LSN to start replicating from. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerLsnPosition sql_server_lsn_position = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerLsnPosition $var + * @return $this + */ + public function setSqlServerLsnPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerLsnPosition::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * @return string + */ + public function getPosition() + { + return $this->whichOneof("position"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpecificStartPosition::class, \Google\Cloud\Datastream\V1\CdcStrategy_SpecificStartPosition::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php new file mode 100644 index 000000000000..3fa2bf4f0db8 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php @@ -0,0 +1,539 @@ +google.cloud.datastream.v1.ConnectionProfile + */ +class ConnectionProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + protected $profile; + protected $connectivity; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource's name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time of the resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time of the resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels. + * @type string $display_name + * Required. Display name. + * @type \Google\Cloud\Datastream\V1\OracleProfile $oracle_profile + * Oracle ConnectionProfile configuration. + * @type \Google\Cloud\Datastream\V1\GcsProfile $gcs_profile + * Cloud Storage ConnectionProfile configuration. + * @type \Google\Cloud\Datastream\V1\MysqlProfile $mysql_profile + * MySQL ConnectionProfile configuration. + * @type \Google\Cloud\Datastream\V1\BigQueryProfile $bigquery_profile + * BigQuery Connection Profile configuration. + * @type \Google\Cloud\Datastream\V1\PostgresqlProfile $postgresql_profile + * PostgreSQL Connection Profile configuration. + * @type \Google\Cloud\Datastream\V1\SqlServerProfile $sql_server_profile + * SQLServer Connection Profile configuration. + * @type \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity $static_service_ip_connectivity + * Static Service IP connectivity. + * @type \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity $forward_ssh_connectivity + * Forward SSH tunnel connectivity. + * @type \Google\Cloud\Datastream\V1\PrivateConnectivity $private_connectivity + * Private connectivity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Oracle ConnectionProfile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleProfile oracle_profile = 100; + * @return \Google\Cloud\Datastream\V1\OracleProfile|null + */ + public function getOracleProfile() + { + return $this->readOneof(100); + } + + public function hasOracleProfile() + { + return $this->hasOneof(100); + } + + /** + * Oracle ConnectionProfile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleProfile oracle_profile = 100; + * @param \Google\Cloud\Datastream\V1\OracleProfile $var + * @return $this + */ + public function setOracleProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleProfile::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Cloud Storage ConnectionProfile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.GcsProfile gcs_profile = 101; + * @return \Google\Cloud\Datastream\V1\GcsProfile|null + */ + public function getGcsProfile() + { + return $this->readOneof(101); + } + + public function hasGcsProfile() + { + return $this->hasOneof(101); + } + + /** + * Cloud Storage ConnectionProfile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.GcsProfile gcs_profile = 101; + * @param \Google\Cloud\Datastream\V1\GcsProfile $var + * @return $this + */ + public function setGcsProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\GcsProfile::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * MySQL ConnectionProfile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlProfile mysql_profile = 102; + * @return \Google\Cloud\Datastream\V1\MysqlProfile|null + */ + public function getMysqlProfile() + { + return $this->readOneof(102); + } + + public function hasMysqlProfile() + { + return $this->hasOneof(102); + } + + /** + * MySQL ConnectionProfile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlProfile mysql_profile = 102; + * @param \Google\Cloud\Datastream\V1\MysqlProfile $var + * @return $this + */ + public function setMysqlProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlProfile::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * BigQuery Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryProfile bigquery_profile = 103; + * @return \Google\Cloud\Datastream\V1\BigQueryProfile|null + */ + public function getBigqueryProfile() + { + return $this->readOneof(103); + } + + public function hasBigqueryProfile() + { + return $this->hasOneof(103); + } + + /** + * BigQuery Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryProfile bigquery_profile = 103; + * @param \Google\Cloud\Datastream\V1\BigQueryProfile $var + * @return $this + */ + public function setBigqueryProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryProfile::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * PostgreSQL Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlProfile postgresql_profile = 104; + * @return \Google\Cloud\Datastream\V1\PostgresqlProfile|null + */ + public function getPostgresqlProfile() + { + return $this->readOneof(104); + } + + public function hasPostgresqlProfile() + { + return $this->hasOneof(104); + } + + /** + * PostgreSQL Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlProfile postgresql_profile = 104; + * @param \Google\Cloud\Datastream\V1\PostgresqlProfile $var + * @return $this + */ + public function setPostgresqlProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlProfile::class); + $this->writeOneof(104, $var); + + return $this; + } + + /** + * SQLServer Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerProfile sql_server_profile = 105; + * @return \Google\Cloud\Datastream\V1\SqlServerProfile|null + */ + public function getSqlServerProfile() + { + return $this->readOneof(105); + } + + public function hasSqlServerProfile() + { + return $this->hasOneof(105); + } + + /** + * SQLServer Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerProfile sql_server_profile = 105; + * @param \Google\Cloud\Datastream\V1\SqlServerProfile $var + * @return $this + */ + public function setSqlServerProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerProfile::class); + $this->writeOneof(105, $var); + + return $this; + } + + /** + * Static Service IP connectivity. + * + * Generated from protobuf field .google.cloud.datastream.v1.StaticServiceIpConnectivity static_service_ip_connectivity = 200; + * @return \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity|null + */ + public function getStaticServiceIpConnectivity() + { + return $this->readOneof(200); + } + + public function hasStaticServiceIpConnectivity() + { + return $this->hasOneof(200); + } + + /** + * Static Service IP connectivity. + * + * Generated from protobuf field .google.cloud.datastream.v1.StaticServiceIpConnectivity static_service_ip_connectivity = 200; + * @param \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity $var + * @return $this + */ + public function setStaticServiceIpConnectivity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity::class); + $this->writeOneof(200, $var); + + return $this; + } + + /** + * Forward SSH tunnel connectivity. + * + * Generated from protobuf field .google.cloud.datastream.v1.ForwardSshTunnelConnectivity forward_ssh_connectivity = 201; + * @return \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity|null + */ + public function getForwardSshConnectivity() + { + return $this->readOneof(201); + } + + public function hasForwardSshConnectivity() + { + return $this->hasOneof(201); + } + + /** + * Forward SSH tunnel connectivity. + * + * Generated from protobuf field .google.cloud.datastream.v1.ForwardSshTunnelConnectivity forward_ssh_connectivity = 201; + * @param \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity $var + * @return $this + */ + public function setForwardSshConnectivity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity::class); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * Private connectivity. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnectivity private_connectivity = 202; + * @return \Google\Cloud\Datastream\V1\PrivateConnectivity|null + */ + public function getPrivateConnectivity() + { + return $this->readOneof(202); + } + + public function hasPrivateConnectivity() + { + return $this->hasOneof(202); + } + + /** + * Private connectivity. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnectivity private_connectivity = 202; + * @param \Google\Cloud\Datastream\V1\PrivateConnectivity $var + * @return $this + */ + public function setPrivateConnectivity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PrivateConnectivity::class); + $this->writeOneof(202, $var); + + return $this; + } + + /** + * @return string + */ + public function getProfile() + { + return $this->whichOneof("profile"); + } + + /** + * @return string + */ + public function getConnectivity() + { + return $this->whichOneof("connectivity"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php new file mode 100644 index 000000000000..340d9479b630 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php @@ -0,0 +1,309 @@ +google.cloud.datastream.v1.CreateConnectionProfileRequest + */ +class CreateConnectionProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of ConnectionProfiles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The connection profile identifier. + * + * Generated from protobuf field string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connection_profile_id = ''; + /** + * Required. The connection profile resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connection_profile = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. Create the connection profile without validating it. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $parent Required. The parent that owns the collection of ConnectionProfiles. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile Required. The connection profile resource to create. + * @param string $connectionProfileId Required. The connection profile identifier. + * + * @return \Google\Cloud\Datastream\V1\CreateConnectionProfileRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile, string $connectionProfileId): self + { + return (new self()) + ->setParent($parent) + ->setConnectionProfile($connectionProfile) + ->setConnectionProfileId($connectionProfileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of ConnectionProfiles. + * @type string $connection_profile_id + * Required. The connection profile identifier. + * @type \Google\Cloud\Datastream\V1\ConnectionProfile $connection_profile + * Required. The connection profile resource to create. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. + * @type bool $force + * Optional. Create the connection profile without validating it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of ConnectionProfiles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of ConnectionProfiles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The connection profile identifier. + * + * Generated from protobuf field string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getConnectionProfileId() + { + return $this->connection_profile_id; + } + + /** + * Required. The connection profile identifier. + * + * Generated from protobuf field string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setConnectionProfileId($var) + { + GPBUtil::checkString($var, True); + $this->connection_profile_id = $var; + + return $this; + } + + /** + * Required. The connection profile resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\ConnectionProfile|null + */ + public function getConnectionProfile() + { + return $this->connection_profile; + } + + public function hasConnectionProfile() + { + return isset($this->connection_profile); + } + + public function clearConnectionProfile() + { + unset($this->connection_profile); + } + + /** + * Required. The connection profile resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\ConnectionProfile $var + * @return $this + */ + public function setConnectionProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ConnectionProfile::class); + $this->connection_profile = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the connection profile, but don't create any + * resources. The default is false. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. Create the connection profile without validating it. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. Create the connection profile without validating it. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php new file mode 100644 index 000000000000..6b6ffc8be9cd --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php @@ -0,0 +1,271 @@ +google.cloud.datastream.v1.CreatePrivateConnectionRequest + */ +class CreatePrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of PrivateConnections. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The private connectivity identifier. + * + * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_connection_id = ''; + /** + * Required. The Private Connectivity resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $private_connection = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to true, will skip validations. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $parent Required. The parent that owns the collection of PrivateConnections. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Datastream\V1\PrivateConnection $privateConnection Required. The Private Connectivity resource to create. + * @param string $privateConnectionId Required. The private connectivity identifier. + * + * @return \Google\Cloud\Datastream\V1\CreatePrivateConnectionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Datastream\V1\PrivateConnection $privateConnection, string $privateConnectionId): self + { + return (new self()) + ->setParent($parent) + ->setPrivateConnection($privateConnection) + ->setPrivateConnectionId($privateConnectionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of PrivateConnections. + * @type string $private_connection_id + * Required. The private connectivity identifier. + * @type \Google\Cloud\Datastream\V1\PrivateConnection $private_connection + * Required. The Private Connectivity resource to create. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, will skip validations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of PrivateConnections. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of PrivateConnections. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The private connectivity identifier. + * + * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrivateConnectionId() + { + return $this->private_connection_id; + } + + /** + * Required. The private connectivity identifier. + * + * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrivateConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->private_connection_id = $var; + + return $this; + } + + /** + * Required. The Private Connectivity resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\PrivateConnection|null + */ + public function getPrivateConnection() + { + return $this->private_connection; + } + + public function hasPrivateConnection() + { + return isset($this->private_connection); + } + + public function clearPrivateConnection() + { + unset($this->private_connection); + } + + /** + * Required. The Private Connectivity resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\PrivateConnection $var + * @return $this + */ + public function setPrivateConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PrivateConnection::class); + $this->private_connection = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, will skip validations. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, will skip validations. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php new file mode 100644 index 000000000000..f30c9dc23530 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php @@ -0,0 +1,237 @@ +google.cloud.datastream.v1.CreateRouteRequest + */ +class CreateRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of Routes. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Route identifier. + * + * Generated from protobuf field string route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $route_id = ''; + /** + * Required. The Route resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.Route route = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $route = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent that owns the collection of Routes. Please see + * {@see DatastreamClient::privateConnectionName()} for help formatting this field. + * @param \Google\Cloud\Datastream\V1\Route $route Required. The Route resource to create. + * @param string $routeId Required. The Route identifier. + * + * @return \Google\Cloud\Datastream\V1\CreateRouteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Datastream\V1\Route $route, string $routeId): self + { + return (new self()) + ->setParent($parent) + ->setRoute($route) + ->setRouteId($routeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of Routes. + * @type string $route_id + * Required. The Route identifier. + * @type \Google\Cloud\Datastream\V1\Route $route + * Required. The Route resource to create. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of Routes. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of Routes. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Route identifier. + * + * Generated from protobuf field string route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRouteId() + { + return $this->route_id; + } + + /** + * Required. The Route identifier. + * + * Generated from protobuf field string route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRouteId($var) + { + GPBUtil::checkString($var, True); + $this->route_id = $var; + + return $this; + } + + /** + * Required. The Route resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.Route route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\Route|null + */ + public function getRoute() + { + return $this->route; + } + + public function hasRoute() + { + return isset($this->route); + } + + public function clearRoute() + { + unset($this->route); + } + + /** + * Required. The Route resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.Route route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\Route $var + * @return $this + */ + public function setRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Route::class); + $this->route = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php new file mode 100644 index 000000000000..6ab1f24b812b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php @@ -0,0 +1,309 @@ +google.cloud.datastream.v1.CreateStreamRequest + */ +class CreateStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of streams. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The stream identifier. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream_id = ''; + /** + * Required. The stream resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Only validate the stream, but don't create any resources. + * The default is false. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. Create the stream without validating it. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $parent Required. The parent that owns the collection of streams. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Datastream\V1\Stream $stream Required. The stream resource to create. + * @param string $streamId Required. The stream identifier. + * + * @return \Google\Cloud\Datastream\V1\CreateStreamRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Datastream\V1\Stream $stream, string $streamId): self + { + return (new self()) + ->setParent($parent) + ->setStream($stream) + ->setStreamId($streamId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of streams. + * @type string $stream_id + * Required. The stream identifier. + * @type \Google\Cloud\Datastream\V1\Stream $stream + * Required. The stream resource to create. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. Only validate the stream, but don't create any resources. + * The default is false. + * @type bool $force + * Optional. Create the stream without validating it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of streams. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of streams. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The stream identifier. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Required. The stream identifier. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * Required. The stream resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\Stream|null + */ + public function getStream() + { + return $this->stream; + } + + public function hasStream() + { + return isset($this->stream); + } + + public function clearStream() + { + unset($this->stream); + } + + /** + * Required. The stream resource to create. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\Stream $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream::class); + $this->stream = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Only validate the stream, but don't create any resources. + * The default is false. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the stream, but don't create any resources. + * The default is false. + * + * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. Create the stream without validating it. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. Create the stream without validating it. + * + * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php new file mode 100644 index 000000000000..0ec48d4f8b77 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php @@ -0,0 +1,155 @@ +google.cloud.datastream.v1.DeleteConnectionProfileRequest + */ +class DeleteConnectionProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the connection profile resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the connection profile resource to delete. Please see + * {@see DatastreamClient::connectionProfileName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\DeleteConnectionProfileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the connection profile resource to delete. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the connection profile resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the connection profile resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php new file mode 100644 index 000000000000..893eb109610f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php @@ -0,0 +1,193 @@ +google.cloud.datastream.v1.DeletePrivateConnectionRequest + */ +class DeletePrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the private connectivity configuration to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to true, any child routes that belong to this + * PrivateConnection will also be deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the private connectivity configuration to delete. Please see + * {@see DatastreamClient::privateConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\DeletePrivateConnectionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the private connectivity configuration to delete. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, any child routes that belong to this + * PrivateConnection will also be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the private connectivity configuration to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the private connectivity configuration to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, any child routes that belong to this + * PrivateConnection will also be deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any child routes that belong to this + * PrivateConnection will also be deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php new file mode 100644 index 000000000000..5ea9034f2150 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php @@ -0,0 +1,155 @@ +google.cloud.datastream.v1.DeleteRouteRequest + */ +class DeleteRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Route resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the Route resource to delete. Please see + * {@see DatastreamClient::routeName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\DeleteRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Route resource to delete. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Route resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Route resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php new file mode 100644 index 000000000000..f55b9262ee48 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php @@ -0,0 +1,155 @@ +google.cloud.datastream.v1.DeleteStreamRequest + */ +class DeleteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the stream resource to delete. Please see + * {@see DatastreamClient::streamName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\DeleteStreamRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the stream resource to delete. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the stream resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php new file mode 100644 index 000000000000..226f5618ec7b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php @@ -0,0 +1,146 @@ +google.cloud.datastream.v1.DestinationConfig + */ +class DestinationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Destination connection profile resource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * + * Generated from protobuf field string destination_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $destination_connection_profile = ''; + protected $destination_stream_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $destination_connection_profile + * Required. Destination connection profile resource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * @type \Google\Cloud\Datastream\V1\GcsDestinationConfig $gcs_destination_config + * A configuration for how data should be loaded to Cloud Storage. + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig $bigquery_destination_config + * BigQuery destination configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Destination connection profile resource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * + * Generated from protobuf field string destination_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDestinationConnectionProfile() + { + return $this->destination_connection_profile; + } + + /** + * Required. Destination connection profile resource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * + * Generated from protobuf field string destination_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestinationConnectionProfile($var) + { + GPBUtil::checkString($var, True); + $this->destination_connection_profile = $var; + + return $this; + } + + /** + * A configuration for how data should be loaded to Cloud Storage. + * + * Generated from protobuf field .google.cloud.datastream.v1.GcsDestinationConfig gcs_destination_config = 100; + * @return \Google\Cloud\Datastream\V1\GcsDestinationConfig|null + */ + public function getGcsDestinationConfig() + { + return $this->readOneof(100); + } + + public function hasGcsDestinationConfig() + { + return $this->hasOneof(100); + } + + /** + * A configuration for how data should be loaded to Cloud Storage. + * + * Generated from protobuf field .google.cloud.datastream.v1.GcsDestinationConfig gcs_destination_config = 100; + * @param \Google\Cloud\Datastream\V1\GcsDestinationConfig $var + * @return $this + */ + public function setGcsDestinationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\GcsDestinationConfig::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * BigQuery destination configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig bigquery_destination_config = 101; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig|null + */ + public function getBigqueryDestinationConfig() + { + return $this->readOneof(101); + } + + public function hasBigqueryDestinationConfig() + { + return $this->hasOneof(101); + } + + /** + * BigQuery destination configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig bigquery_destination_config = 101; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig $var + * @return $this + */ + public function setBigqueryDestinationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * @return string + */ + public function getDestinationStreamConfig() + { + return $this->whichOneof("destination_stream_config"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php new file mode 100644 index 000000000000..39bbb78566ce --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php @@ -0,0 +1,365 @@ +google.cloud.datastream.v1.DiscoverConnectionProfileRequest + */ +class DiscoverConnectionProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the connection profile type. Must be in + * the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $target; + protected $hierarchy; + protected $data_object; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the connection profile type. Must be in + * the format `projects/*/locations/*`. + * @type \Google\Cloud\Datastream\V1\ConnectionProfile $connection_profile + * An ad-hoc connection profile configuration. + * @type string $connection_profile_name + * A reference to an existing connection profile. + * @type bool $full_hierarchy + * Whether to retrieve the full hierarchy of data objects (TRUE) or only the + * current level (FALSE). + * @type int $hierarchy_depth + * The number of hierarchy levels below the current level to be retrieved. + * @type \Google\Cloud\Datastream\V1\OracleRdbms $oracle_rdbms + * Oracle RDBMS to enrich with child data objects and metadata. + * @type \Google\Cloud\Datastream\V1\MysqlRdbms $mysql_rdbms + * MySQL RDBMS to enrich with child data objects and metadata. + * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_rdbms + * PostgreSQL RDBMS to enrich with child data objects and metadata. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_rdbms + * SQLServer RDBMS to enrich with child data objects and metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the connection profile type. Must be in + * the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the connection profile type. Must be in + * the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An ad-hoc connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 200; + * @return \Google\Cloud\Datastream\V1\ConnectionProfile|null + */ + public function getConnectionProfile() + { + return $this->readOneof(200); + } + + public function hasConnectionProfile() + { + return $this->hasOneof(200); + } + + /** + * An ad-hoc connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 200; + * @param \Google\Cloud\Datastream\V1\ConnectionProfile $var + * @return $this + */ + public function setConnectionProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ConnectionProfile::class); + $this->writeOneof(200, $var); + + return $this; + } + + /** + * A reference to an existing connection profile. + * + * Generated from protobuf field string connection_profile_name = 201; + * @return string + */ + public function getConnectionProfileName() + { + return $this->readOneof(201); + } + + public function hasConnectionProfileName() + { + return $this->hasOneof(201); + } + + /** + * A reference to an existing connection profile. + * + * Generated from protobuf field string connection_profile_name = 201; + * @param string $var + * @return $this + */ + public function setConnectionProfileName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(201, $var); + + return $this; + } + + /** + * Whether to retrieve the full hierarchy of data objects (TRUE) or only the + * current level (FALSE). + * + * Generated from protobuf field bool full_hierarchy = 3; + * @return bool + */ + public function getFullHierarchy() + { + return $this->readOneof(3); + } + + public function hasFullHierarchy() + { + return $this->hasOneof(3); + } + + /** + * Whether to retrieve the full hierarchy of data objects (TRUE) or only the + * current level (FALSE). + * + * Generated from protobuf field bool full_hierarchy = 3; + * @param bool $var + * @return $this + */ + public function setFullHierarchy($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The number of hierarchy levels below the current level to be retrieved. + * + * Generated from protobuf field int32 hierarchy_depth = 4; + * @return int + */ + public function getHierarchyDepth() + { + return $this->readOneof(4); + } + + public function hasHierarchyDepth() + { + return $this->hasOneof(4); + } + + /** + * The number of hierarchy levels below the current level to be retrieved. + * + * Generated from protobuf field int32 hierarchy_depth = 4; + * @param int $var + * @return $this + */ + public function setHierarchyDepth($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Oracle RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; + * @return \Google\Cloud\Datastream\V1\OracleRdbms|null + */ + public function getOracleRdbms() + { + return $this->readOneof(100); + } + + public function hasOracleRdbms() + { + return $this->hasOneof(100); + } + + /** + * Oracle RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; + * @param \Google\Cloud\Datastream\V1\OracleRdbms $var + * @return $this + */ + public function setOracleRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * MySQL RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; + * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null + */ + public function getMysqlRdbms() + { + return $this->readOneof(101); + } + + public function hasMysqlRdbms() + { + return $this->hasOneof(101); + } + + /** + * MySQL RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; + * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var + * @return $this + */ + public function setMysqlRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * PostgreSQL RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; + * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null + */ + public function getPostgresqlRdbms() + { + return $this->readOneof(102); + } + + public function hasPostgresqlRdbms() + { + return $this->hasOneof(102); + } + + /** + * PostgreSQL RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; + * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var + * @return $this + */ + public function setPostgresqlRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * SQLServer RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getSqlServerRdbms() + { + return $this->readOneof(103); + } + + public function hasSqlServerRdbms() + { + return $this->hasOneof(103); + } + + /** + * SQLServer RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setSqlServerRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + + /** + * @return string + */ + public function getHierarchy() + { + return $this->whichOneof("hierarchy"); + } + + /** + * @return string + */ + public function getDataObject() + { + return $this->whichOneof("data_object"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php new file mode 100644 index 000000000000..22ea94898f57 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php @@ -0,0 +1,174 @@ +google.cloud.datastream.v1.DiscoverConnectionProfileResponse + */ +class DiscoverConnectionProfileResponse extends \Google\Protobuf\Internal\Message +{ + protected $data_object; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\OracleRdbms $oracle_rdbms + * Enriched Oracle RDBMS object. + * @type \Google\Cloud\Datastream\V1\MysqlRdbms $mysql_rdbms + * Enriched MySQL RDBMS object. + * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_rdbms + * Enriched PostgreSQL RDBMS object. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_rdbms + * Enriched SQLServer RDBMS object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Enriched Oracle RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; + * @return \Google\Cloud\Datastream\V1\OracleRdbms|null + */ + public function getOracleRdbms() + { + return $this->readOneof(100); + } + + public function hasOracleRdbms() + { + return $this->hasOneof(100); + } + + /** + * Enriched Oracle RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; + * @param \Google\Cloud\Datastream\V1\OracleRdbms $var + * @return $this + */ + public function setOracleRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Enriched MySQL RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; + * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null + */ + public function getMysqlRdbms() + { + return $this->readOneof(101); + } + + public function hasMysqlRdbms() + { + return $this->hasOneof(101); + } + + /** + * Enriched MySQL RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; + * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var + * @return $this + */ + public function setMysqlRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Enriched PostgreSQL RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; + * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null + */ + public function getPostgresqlRdbms() + { + return $this->readOneof(102); + } + + public function hasPostgresqlRdbms() + { + return $this->hasOneof(102); + } + + /** + * Enriched PostgreSQL RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; + * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var + * @return $this + */ + public function setPostgresqlRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Enriched SQLServer RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getSqlServerRdbms() + { + return $this->readOneof(103); + } + + public function hasSqlServerRdbms() + { + return $this->hasOneof(103); + } + + /** + * Enriched SQLServer RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setSqlServerRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * @return string + */ + public function getDataObject() + { + return $this->whichOneof("data_object"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php new file mode 100644 index 000000000000..6b8bb673c8ba --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php @@ -0,0 +1,217 @@ +google.cloud.datastream.v1.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * A title that explains the reason for the error. + * + * Generated from protobuf field string reason = 1; + */ + protected $reason = ''; + /** + * A unique identifier for this specific error, + * allowing it to be traced throughout the system in logs and API responses. + * + * Generated from protobuf field string error_uuid = 2; + */ + protected $error_uuid = ''; + /** + * A message containing more information about the error that occurred. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + /** + * The time when the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 4; + */ + protected $error_time = null; + /** + * Additional information about the error. + * + * Generated from protobuf field map details = 5; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reason + * A title that explains the reason for the error. + * @type string $error_uuid + * A unique identifier for this specific error, + * allowing it to be traced throughout the system in logs and API responses. + * @type string $message + * A message containing more information about the error that occurred. + * @type \Google\Protobuf\Timestamp $error_time + * The time when the error occurred. + * @type array|\Google\Protobuf\Internal\MapField $details + * Additional information about the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * A title that explains the reason for the error. + * + * Generated from protobuf field string reason = 1; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * A title that explains the reason for the error. + * + * Generated from protobuf field string reason = 1; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * A unique identifier for this specific error, + * allowing it to be traced throughout the system in logs and API responses. + * + * Generated from protobuf field string error_uuid = 2; + * @return string + */ + public function getErrorUuid() + { + return $this->error_uuid; + } + + /** + * A unique identifier for this specific error, + * allowing it to be traced throughout the system in logs and API responses. + * + * Generated from protobuf field string error_uuid = 2; + * @param string $var + * @return $this + */ + public function setErrorUuid($var) + { + GPBUtil::checkString($var, True); + $this->error_uuid = $var; + + return $this; + } + + /** + * A message containing more information about the error that occurred. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * A message containing more information about the error that occurred. + * + * 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; + } + + /** + * The time when the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getErrorTime() + { + return $this->error_time; + } + + public function hasErrorTime() + { + return isset($this->error_time); + } + + public function clearErrorTime() + { + unset($this->error_time); + } + + /** + * The time when the error occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp error_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setErrorTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->error_time = $var; + + return $this; + } + + /** + * Additional information about the error. + * + * Generated from protobuf field map details = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Additional information about the error. + * + * Generated from protobuf field map details = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php new file mode 100644 index 000000000000..5f2076e6af4b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php @@ -0,0 +1,158 @@ +google.cloud.datastream.v1.FetchStaticIpsRequest + */ +class FetchStaticIpsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Maximum number of Ips to return, will likely not be specified. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListStaticIps` call. + * will likely not be specified. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/*/locations/*`. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\FetchStaticIpsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of Ips to return, will likely not be specified. + * @type string $page_token + * A page token, received from a previous `ListStaticIps` call. + * will likely not be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name for the location for which static IPs should be + * returned. Must be in the format `projects/*/locations/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Maximum number of Ips to return, will likely not be specified. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Ips to return, will likely not be specified. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListStaticIps` call. + * will likely not be specified. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListStaticIps` call. + * will likely not be specified. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php new file mode 100644 index 000000000000..880a9a3350a6 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php @@ -0,0 +1,105 @@ +google.cloud.datastream.v1.FetchStaticIpsResponse + */ +class FetchStaticIpsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * list of static ips by account + * + * Generated from protobuf field repeated string static_ips = 1; + */ + private $static_ips; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $static_ips + * list of static ips by account + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * list of static ips by account + * + * Generated from protobuf field repeated string static_ips = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStaticIps() + { + return $this->static_ips; + } + + /** + * list of static ips by account + * + * Generated from protobuf field repeated string static_ips = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStaticIps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->static_ips = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php new file mode 100644 index 000000000000..7a04f3dee960 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php @@ -0,0 +1,210 @@ +google.cloud.datastream.v1.ForwardSshTunnelConnectivity + */ +class ForwardSshTunnelConnectivity extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname for the SSH tunnel. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Required. Username for the SSH tunnel. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Port for the SSH tunnel, default value is 22. + * + * Generated from protobuf field int32 port = 3; + */ + protected $port = 0; + protected $authentication_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * Required. Hostname for the SSH tunnel. + * @type string $username + * Required. Username for the SSH tunnel. + * @type int $port + * Port for the SSH tunnel, default value is 22. + * @type string $password + * Input only. SSH password. + * @type string $private_key + * Input only. SSH private key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname for the SSH tunnel. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Hostname for the SSH tunnel. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Required. Username for the SSH tunnel. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username for the SSH tunnel. + * + * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Port for the SSH tunnel, default value is 22. + * + * Generated from protobuf field int32 port = 3; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Port for the SSH tunnel, default value is 22. + * + * Generated from protobuf field int32 port = 3; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Input only. SSH password. + * + * Generated from protobuf field string password = 100 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPassword() + { + return $this->readOneof(100); + } + + public function hasPassword() + { + return $this->hasOneof(100); + } + + /** + * Input only. SSH password. + * + * Generated from protobuf field string password = 100 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Input only. SSH private key. + * + * Generated from protobuf field string private_key = 101 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPrivateKey() + { + return $this->readOneof(101); + } + + public function hasPrivateKey() + { + return $this->hasOneof(101); + } + + /** + * Input only. SSH private key. + * + * Generated from protobuf field string private_key = 101 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateKey($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthenticationMethod() + { + return $this->whichOneof("authentication_method"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php new file mode 100644 index 000000000000..c302c34150e4 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php @@ -0,0 +1,228 @@ +google.cloud.datastream.v1.GcsDestinationConfig + */ +class GcsDestinationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Path inside the Cloud Storage bucket to write data to. + * + * Generated from protobuf field string path = 1; + */ + protected $path = ''; + /** + * The maximum file size to be saved in the bucket. + * + * Generated from protobuf field int32 file_rotation_mb = 2; + */ + protected $file_rotation_mb = 0; + /** + * The maximum duration for which new events are added before a file is + * closed and a new file is created. Values within the range of 15-60 seconds + * are allowed. + * + * Generated from protobuf field .google.protobuf.Duration file_rotation_interval = 3; + */ + protected $file_rotation_interval = null; + protected $file_format; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Path inside the Cloud Storage bucket to write data to. + * @type int $file_rotation_mb + * The maximum file size to be saved in the bucket. + * @type \Google\Protobuf\Duration $file_rotation_interval + * The maximum duration for which new events are added before a file is + * closed and a new file is created. Values within the range of 15-60 seconds + * are allowed. + * @type \Google\Cloud\Datastream\V1\AvroFileFormat $avro_file_format + * AVRO file format configuration. + * @type \Google\Cloud\Datastream\V1\JsonFileFormat $json_file_format + * JSON file format configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Path inside the Cloud Storage bucket to write data to. + * + * Generated from protobuf field string path = 1; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Path inside the Cloud Storage bucket to write data to. + * + * Generated from protobuf field string path = 1; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * The maximum file size to be saved in the bucket. + * + * Generated from protobuf field int32 file_rotation_mb = 2; + * @return int + */ + public function getFileRotationMb() + { + return $this->file_rotation_mb; + } + + /** + * The maximum file size to be saved in the bucket. + * + * Generated from protobuf field int32 file_rotation_mb = 2; + * @param int $var + * @return $this + */ + public function setFileRotationMb($var) + { + GPBUtil::checkInt32($var); + $this->file_rotation_mb = $var; + + return $this; + } + + /** + * The maximum duration for which new events are added before a file is + * closed and a new file is created. Values within the range of 15-60 seconds + * are allowed. + * + * Generated from protobuf field .google.protobuf.Duration file_rotation_interval = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getFileRotationInterval() + { + return $this->file_rotation_interval; + } + + public function hasFileRotationInterval() + { + return isset($this->file_rotation_interval); + } + + public function clearFileRotationInterval() + { + unset($this->file_rotation_interval); + } + + /** + * The maximum duration for which new events are added before a file is + * closed and a new file is created. Values within the range of 15-60 seconds + * are allowed. + * + * Generated from protobuf field .google.protobuf.Duration file_rotation_interval = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFileRotationInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->file_rotation_interval = $var; + + return $this; + } + + /** + * AVRO file format configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100; + * @return \Google\Cloud\Datastream\V1\AvroFileFormat|null + */ + public function getAvroFileFormat() + { + return $this->readOneof(100); + } + + public function hasAvroFileFormat() + { + return $this->hasOneof(100); + } + + /** + * AVRO file format configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100; + * @param \Google\Cloud\Datastream\V1\AvroFileFormat $var + * @return $this + */ + public function setAvroFileFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\AvroFileFormat::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * JSON file format configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101; + * @return \Google\Cloud\Datastream\V1\JsonFileFormat|null + */ + public function getJsonFileFormat() + { + return $this->readOneof(101); + } + + public function hasJsonFileFormat() + { + return $this->hasOneof(101); + } + + /** + * JSON file format configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101; + * @param \Google\Cloud\Datastream\V1\JsonFileFormat $var + * @return $this + */ + public function setJsonFileFormat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\JsonFileFormat::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * @return string + */ + public function getFileFormat() + { + return $this->whichOneof("file_format"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php new file mode 100644 index 000000000000..2b2d378ccb90 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.GcsProfile + */ +class GcsProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud Storage bucket name. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = ''; + /** + * The root path inside the Cloud Storage bucket. + * + * Generated from protobuf field string root_path = 2; + */ + protected $root_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Required. The Cloud Storage bucket name. + * @type string $root_path + * The root path inside the Cloud Storage bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud Storage bucket name. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Required. The Cloud Storage bucket name. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * The root path inside the Cloud Storage bucket. + * + * Generated from protobuf field string root_path = 2; + * @return string + */ + public function getRootPath() + { + return $this->root_path; + } + + /** + * The root path inside the Cloud Storage bucket. + * + * Generated from protobuf field string root_path = 2; + * @param string $var + * @return $this + */ + public function setRootPath($var) + { + GPBUtil::checkString($var, True); + $this->root_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php new file mode 100644 index 000000000000..e713c9a456e4 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php @@ -0,0 +1,81 @@ +google.cloud.datastream.v1.GetConnectionProfileRequest + */ +class GetConnectionProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the connection profile resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the connection profile resource to get. Please see + * {@see DatastreamClient::connectionProfileName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\GetConnectionProfileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the connection profile resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the connection profile resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the connection profile resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php new file mode 100644 index 000000000000..ab9cb8ef07e9 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php @@ -0,0 +1,81 @@ +google.cloud.datastream.v1.GetPrivateConnectionRequest + */ +class GetPrivateConnectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the private connectivity configuration to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the private connectivity configuration to get. Please see + * {@see DatastreamClient::privateConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\GetPrivateConnectionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the private connectivity configuration to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the private connectivity configuration to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the private connectivity configuration to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php new file mode 100644 index 000000000000..4f4824fea95d --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php @@ -0,0 +1,81 @@ +google.cloud.datastream.v1.GetRouteRequest + */ +class GetRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Route resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Route resource to get. Please see + * {@see DatastreamClient::routeName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\GetRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Route resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Route resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Route resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php new file mode 100644 index 000000000000..717131637c8e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php @@ -0,0 +1,81 @@ +google.cloud.datastream.v1.GetStreamObjectRequest + */ +class GetStreamObjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream object resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the stream object resource to get. Please see + * {@see DatastreamClient::streamObjectName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\GetStreamObjectRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the stream object resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream object resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the stream object resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php new file mode 100644 index 000000000000..e76d92f218bc --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php @@ -0,0 +1,81 @@ +google.cloud.datastream.v1.GetStreamRequest + */ +class GetStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the stream resource to get. Please see + * {@see DatastreamClient::streamName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\GetStreamRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the stream resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the stream resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php new file mode 100644 index 000000000000..f397759430a8 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.JsonFileFormat + */ +class JsonFileFormat extends \Google\Protobuf\Internal\Message +{ + /** + * The schema file format along JSON data files. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1; + */ + protected $schema_file_format = 0; + /** + * Compression of the loaded JSON file. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2; + */ + protected $compression = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $schema_file_format + * The schema file format along JSON data files. + * @type int $compression + * Compression of the loaded JSON file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * The schema file format along JSON data files. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1; + * @return int + */ + public function getSchemaFileFormat() + { + return $this->schema_file_format; + } + + /** + * The schema file format along JSON data files. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1; + * @param int $var + * @return $this + */ + public function setSchemaFileFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\JsonFileFormat\SchemaFileFormat::class); + $this->schema_file_format = $var; + + return $this; + } + + /** + * Compression of the loaded JSON file. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2; + * @return int + */ + public function getCompression() + { + return $this->compression; + } + + /** + * Compression of the loaded JSON file. + * + * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2; + * @param int $var + * @return $this + */ + public function setCompression($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\JsonFileFormat\JsonCompression::class); + $this->compression = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php new file mode 100644 index 000000000000..3c398cc351cf --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php @@ -0,0 +1,64 @@ +google.cloud.datastream.v1.JsonFileFormat.JsonCompression + */ +class JsonCompression +{ + /** + * Unspecified json file compression. + * + * Generated from protobuf enum JSON_COMPRESSION_UNSPECIFIED = 0; + */ + const JSON_COMPRESSION_UNSPECIFIED = 0; + /** + * Do not compress JSON file. + * + * Generated from protobuf enum NO_COMPRESSION = 1; + */ + const NO_COMPRESSION = 1; + /** + * Gzip compression. + * + * Generated from protobuf enum GZIP = 2; + */ + const GZIP = 2; + + private static $valueToName = [ + self::JSON_COMPRESSION_UNSPECIFIED => 'JSON_COMPRESSION_UNSPECIFIED', + self::NO_COMPRESSION => 'NO_COMPRESSION', + self::GZIP => 'GZIP', + ]; + + 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(JsonCompression::class, \Google\Cloud\Datastream\V1\JsonFileFormat_JsonCompression::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php new file mode 100644 index 000000000000..ab8cd7bcf87c --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php @@ -0,0 +1,64 @@ +google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat + */ +class SchemaFileFormat +{ + /** + * Unspecified schema file format. + * + * Generated from protobuf enum SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; + */ + const SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; + /** + * Do not attach schema file. + * + * Generated from protobuf enum NO_SCHEMA_FILE = 1; + */ + const NO_SCHEMA_FILE = 1; + /** + * Avro schema format. + * + * Generated from protobuf enum AVRO_SCHEMA_FILE = 2; + */ + const AVRO_SCHEMA_FILE = 2; + + private static $valueToName = [ + self::SCHEMA_FILE_FORMAT_UNSPECIFIED => 'SCHEMA_FILE_FORMAT_UNSPECIFIED', + self::NO_SCHEMA_FILE => 'NO_SCHEMA_FILE', + self::AVRO_SCHEMA_FILE => 'AVRO_SCHEMA_FILE', + ]; + + 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(SchemaFileFormat::class, \Google\Cloud\Datastream\V1\JsonFileFormat_SchemaFileFormat::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php new file mode 100644 index 000000000000..42fa4221565e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php @@ -0,0 +1,237 @@ +google.cloud.datastream.v1.ListConnectionProfilesRequest + */ +class ListConnectionProfilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of connection profiles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of connection profiles to return. + * If unspecified, at most 50 connection profiles will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent that owns the collection of connection profiles. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\ListConnectionProfilesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of connection profiles. + * @type int $page_size + * Maximum number of connection profiles to return. + * If unspecified, at most 50 connection profiles will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Page token received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * @type string $filter + * Filter request. + * @type string $order_by + * Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of connection profiles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of connection profiles. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of connection profiles to return. + * If unspecified, at most 50 connection profiles will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of connection profiles to return. + * If unspecified, at most 50 connection profiles will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token received from a previous `ListConnectionProfiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConnectionProfiles` + * must match the call that provided the page token. + * + * 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; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php new file mode 100644 index 000000000000..9d6b44dff3d9 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php @@ -0,0 +1,139 @@ +google.cloud.datastream.v1.ListConnectionProfilesResponse + */ +class ListConnectionProfilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of connection profiles. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.ConnectionProfile connection_profiles = 1; + */ + private $connection_profiles; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\ConnectionProfile>|\Google\Protobuf\Internal\RepeatedField $connection_profiles + * List of connection profiles. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * List of connection profiles. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.ConnectionProfile connection_profiles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectionProfiles() + { + return $this->connection_profiles; + } + + /** + * List of connection profiles. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.ConnectionProfile connection_profiles = 1; + * @param array<\Google\Cloud\Datastream\V1\ConnectionProfile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectionProfiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\ConnectionProfile::class); + $this->connection_profiles = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php new file mode 100644 index 000000000000..577bb1a4674e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php @@ -0,0 +1,250 @@ +google.cloud.datastream.v1.ListPrivateConnectionsRequest + */ +class ListPrivateConnectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of private connectivity + * configurations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of private connectivity configurations to return. + * If unspecified, at most 50 private connectivity configurations that will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent that owns the collection of private connectivity + * configurations. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\ListPrivateConnectionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of private connectivity + * configurations. + * @type int $page_size + * Maximum number of private connectivity configurations to return. + * If unspecified, at most 50 private connectivity configurations that will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * @type string $filter + * Filter request. + * @type string $order_by + * Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of private connectivity + * configurations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of private connectivity + * configurations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of private connectivity configurations to return. + * If unspecified, at most 50 private connectivity configurations that will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of private connectivity configurations to return. + * If unspecified, at most 50 private connectivity configurations that will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token received from a previous `ListPrivateConnections` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListPrivateConnections` must match the call that provided the page + * token. + * + * 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; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php new file mode 100644 index 000000000000..73da1daeade2 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php @@ -0,0 +1,139 @@ +google.cloud.datastream.v1.ListPrivateConnectionsResponse + */ +class ListPrivateConnectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of private connectivity configurations. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PrivateConnection private_connections = 1; + */ + private $private_connections; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $private_connections + * List of private connectivity configurations. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * List of private connectivity configurations. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PrivateConnection private_connections = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrivateConnections() + { + return $this->private_connections; + } + + /** + * List of private connectivity configurations. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PrivateConnection private_connections = 1; + * @param array<\Google\Cloud\Datastream\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrivateConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PrivateConnection::class); + $this->private_connections = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php new file mode 100644 index 000000000000..e33432d55579 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php @@ -0,0 +1,245 @@ +google.cloud.datastream.v1.ListRoutesRequest + */ +class ListRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of Routess. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Routes to return. The service may return + * fewer than this value. If unspecified, at most 50 Routes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token received from a previous `ListRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRoutes` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent that owns the collection of Routess. Please see + * {@see DatastreamClient::privateConnectionName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\ListRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of Routess. + * @type int $page_size + * Maximum number of Routes to return. The service may return + * fewer than this value. If unspecified, at most 50 Routes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * @type string $page_token + * Page token received from a previous `ListRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRoutes` must match the call that provided the page + * token. + * @type string $filter + * Filter request. + * @type string $order_by + * Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of Routess. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of Routess. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Routes to return. The service may return + * fewer than this value. If unspecified, at most 50 Routes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Routes to return. The service may return + * fewer than this value. If unspecified, at most 50 Routes + * will be returned. The maximum value is 1000; values above 1000 will be + * coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token received from a previous `ListRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRoutes` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token received from a previous `ListRoutes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListRoutes` must match the call that provided the page + * token. + * + * 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; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php new file mode 100644 index 000000000000..627b34ee9e4e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php @@ -0,0 +1,139 @@ +google.cloud.datastream.v1.ListRoutesResponse + */ +class ListRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of Routes. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Route routes = 1; + */ + private $routes; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\Route>|\Google\Protobuf\Internal\RepeatedField $routes + * List of Routes. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * List of Routes. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Route routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * List of Routes. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Route routes = 1; + * @param array<\Google\Cloud\Datastream\V1\Route>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Route::class); + $this->routes = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php new file mode 100644 index 000000000000..0a10310b2c6f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php @@ -0,0 +1,169 @@ +google.cloud.datastream.v1.ListStreamObjectsRequest + */ +class ListStreamObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent stream that owns the collection of objects. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of objects to return. Default is 50. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token received from a previous `ListStreamObjectsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListStreamObjectsRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent stream that owns the collection of objects. Please see + * {@see DatastreamClient::streamName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\ListStreamObjectsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent stream that owns the collection of objects. + * @type int $page_size + * Maximum number of objects to return. Default is 50. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Page token received from a previous `ListStreamObjectsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListStreamObjectsRequest` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent stream that owns the collection of objects. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent stream that owns the collection of objects. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of objects to return. Default is 50. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of objects to return. Default is 50. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token received from a previous `ListStreamObjectsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListStreamObjectsRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token received from a previous `ListStreamObjectsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListStreamObjectsRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php new file mode 100644 index 000000000000..a4fe04856abe --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.ListStreamObjectsResponse + */ +class ListStreamObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of stream objects. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.StreamObject stream_objects = 1; + */ + private $stream_objects; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\StreamObject>|\Google\Protobuf\Internal\RepeatedField $stream_objects + * List of stream objects. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * List of stream objects. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.StreamObject stream_objects = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStreamObjects() + { + return $this->stream_objects; + } + + /** + * List of stream objects. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.StreamObject stream_objects = 1; + * @param array<\Google\Cloud\Datastream\V1\StreamObject>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStreamObjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\StreamObject::class); + $this->stream_objects = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php new file mode 100644 index 000000000000..73c1f5270403 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php @@ -0,0 +1,237 @@ +google.cloud.datastream.v1.ListStreamsRequest + */ +class ListStreamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent that owns the collection of streams. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of streams to return. + * If unspecified, at most 50 streams will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token received from a previous `ListStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListStreams` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent that owns the collection of streams. Please see + * {@see DatastreamClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\ListStreamsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent that owns the collection of streams. + * @type int $page_size + * Maximum number of streams to return. + * If unspecified, at most 50 streams will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Page token received from a previous `ListStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListStreams` + * must match the call that provided the page token. + * @type string $filter + * Filter request. + * @type string $order_by + * Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent that owns the collection of streams. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent that owns the collection of streams. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of streams to return. + * If unspecified, at most 50 streams will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of streams to return. + * If unspecified, at most 50 streams will be returned. The maximum + * value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token received from a previous `ListStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListStreams` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token received from a previous `ListStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListStreams` + * must match the call that provided the page token. + * + * 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; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter request. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Order by fields for the result. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php new file mode 100644 index 000000000000..c4b245e8d607 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php @@ -0,0 +1,139 @@ +google.cloud.datastream.v1.ListStreamsResponse + */ +class ListStreamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of streams + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Stream streams = 1; + */ + private $streams; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\Stream>|\Google\Protobuf\Internal\RepeatedField $streams + * List of streams + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * List of streams + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Stream streams = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStreams() + { + return $this->streams; + } + + /** + * List of streams + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Stream streams = 1; + * @param array<\Google\Cloud\Datastream\V1\Stream>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Stream::class); + $this->streams = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php new file mode 100644 index 000000000000..5863ccd43c02 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php @@ -0,0 +1,112 @@ +google.cloud.datastream.v1.LookupStreamObjectRequest + */ +class LookupStreamObjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent stream that owns the collection of objects. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The source object identifier which maps to the stream object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_object_identifier = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent stream that owns the collection of objects. + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier $source_object_identifier + * Required. The source object identifier which maps to the stream object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent stream that owns the collection of objects. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent stream that owns the collection of objects. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The source object identifier which maps to the stream object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier|null + */ + public function getSourceObjectIdentifier() + { + return $this->source_object_identifier; + } + + public function hasSourceObjectIdentifier() + { + return isset($this->source_object_identifier); + } + + public function clearSourceObjectIdentifier() + { + unset($this->source_object_identifier); + } + + /** + * Required. The source object identifier which maps to the stream object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier $var + * @return $this + */ + public function setSourceObjectIdentifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier::class); + $this->source_object_identifier = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php new file mode 100644 index 000000000000..558dc222effe --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php @@ -0,0 +1,343 @@ +google.cloud.datastream.v1.MysqlColumn + */ +class MysqlColumn extends \Google\Protobuf\Internal\Message +{ + /** + * Column name. + * + * Generated from protobuf field string column = 1; + */ + protected $column = ''; + /** + * The MySQL data type. Full data types list can be found here: + * https://dev.mysql.com/doc/refman/8.0/en/data-types.html + * + * Generated from protobuf field string data_type = 2; + */ + protected $data_type = ''; + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + */ + protected $length = 0; + /** + * Column collation. + * + * Generated from protobuf field string collation = 4; + */ + protected $collation = ''; + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 5; + */ + protected $primary_key = false; + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 6; + */ + protected $nullable = false; + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 7; + */ + protected $ordinal_position = 0; + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 8; + */ + protected $precision = 0; + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 9; + */ + protected $scale = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Column name. + * @type string $data_type + * The MySQL data type. Full data types list can be found here: + * https://dev.mysql.com/doc/refman/8.0/en/data-types.html + * @type int $length + * Column length. + * @type string $collation + * Column collation. + * @type bool $primary_key + * Whether or not the column represents a primary key. + * @type bool $nullable + * Whether or not the column can accept a null value. + * @type int $ordinal_position + * The ordinal position of the column in the table. + * @type int $precision + * Column precision. + * @type int $scale + * Column scale. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * The MySQL data type. Full data types list can be found here: + * https://dev.mysql.com/doc/refman/8.0/en/data-types.html + * + * Generated from protobuf field string data_type = 2; + * @return string + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * The MySQL data type. Full data types list can be found here: + * https://dev.mysql.com/doc/refman/8.0/en/data-types.html + * + * Generated from protobuf field string data_type = 2; + * @param string $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkString($var, True); + $this->data_type = $var; + + return $this; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + + /** + * Column collation. + * + * Generated from protobuf field string collation = 4; + * @return string + */ + public function getCollation() + { + return $this->collation; + } + + /** + * Column collation. + * + * Generated from protobuf field string collation = 4; + * @param string $var + * @return $this + */ + public function setCollation($var) + { + GPBUtil::checkString($var, True); + $this->collation = $var; + + return $this; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 5; + * @return bool + */ + public function getPrimaryKey() + { + return $this->primary_key; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 5; + * @param bool $var + * @return $this + */ + public function setPrimaryKey($var) + { + GPBUtil::checkBool($var); + $this->primary_key = $var; + + return $this; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 6; + * @return bool + */ + public function getNullable() + { + return $this->nullable; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 6; + * @param bool $var + * @return $this + */ + public function setNullable($var) + { + GPBUtil::checkBool($var); + $this->nullable = $var; + + return $this; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 7; + * @return int + */ + public function getOrdinalPosition() + { + return $this->ordinal_position; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 7; + * @param int $var + * @return $this + */ + public function setOrdinalPosition($var) + { + GPBUtil::checkInt32($var); + $this->ordinal_position = $var; + + return $this; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 8; + * @return int + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 8; + * @param int $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkInt32($var); + $this->precision = $var; + + return $this; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 9; + * @return int + */ + public function getScale() + { + return $this->scale; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 9; + * @param int $var + * @return $this + */ + public function setScale($var) + { + GPBUtil::checkInt32($var); + $this->scale = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php new file mode 100644 index 000000000000..eff1f7b772d5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.MysqlDatabase + */ +class MysqlDatabase extends \Google\Protobuf\Internal\Message +{ + /** + * Database name. + * + * Generated from protobuf field string database = 1; + */ + protected $database = ''; + /** + * Tables in the database. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlTable mysql_tables = 2; + */ + private $mysql_tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Database name. + * @type array<\Google\Cloud\Datastream\V1\MysqlTable>|\Google\Protobuf\Internal\RepeatedField $mysql_tables + * Tables in the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Database name. + * + * Generated from protobuf field string database = 1; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Database name. + * + * 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; + } + + /** + * Tables in the database. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlTable mysql_tables = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMysqlTables() + { + return $this->mysql_tables; + } + + /** + * Tables in the database. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlTable mysql_tables = 2; + * @param array<\Google\Cloud\Datastream\V1\MysqlTable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMysqlTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MysqlTable::class); + $this->mysql_tables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlLogPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlLogPosition.php new file mode 100644 index 000000000000..c5ccc0e8d941 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlLogPosition.php @@ -0,0 +1,111 @@ +google.cloud.datastream.v1.MysqlLogPosition + */ +class MysqlLogPosition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The binary log file name. + * + * Generated from protobuf field string log_file = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $log_file = ''; + /** + * Optional. The position within the binary log file. Default is head of file. + * + * Generated from protobuf field optional int32 log_position = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $log_position = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $log_file + * Required. The binary log file name. + * @type int $log_position + * Optional. The position within the binary log file. Default is head of file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The binary log file name. + * + * Generated from protobuf field string log_file = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLogFile() + { + return $this->log_file; + } + + /** + * Required. The binary log file name. + * + * Generated from protobuf field string log_file = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLogFile($var) + { + GPBUtil::checkString($var, True); + $this->log_file = $var; + + return $this; + } + + /** + * Optional. The position within the binary log file. Default is head of file. + * + * Generated from protobuf field optional int32 log_position = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLogPosition() + { + return isset($this->log_position) ? $this->log_position : 0; + } + + public function hasLogPosition() + { + return isset($this->log_position); + } + + public function clearLogPosition() + { + unset($this->log_position); + } + + /** + * Optional. The position within the binary log file. Default is head of file. + * + * Generated from protobuf field optional int32 log_position = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLogPosition($var) + { + GPBUtil::checkInt32($var); + $this->log_position = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php new file mode 100644 index 000000000000..336ec4bbb055 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php @@ -0,0 +1,218 @@ +google.cloud.datastream.v1.MysqlProfile + */ +class MysqlProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname for the MySQL connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Port for the MySQL connection, default value is 3306. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + /** + * Required. Username for the MySQL connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $password = ''; + /** + * SSL configuration for the MySQL connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSslConfig ssl_config = 5; + */ + protected $ssl_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * Required. Hostname for the MySQL connection. + * @type int $port + * Port for the MySQL connection, default value is 3306. + * @type string $username + * Required. Username for the MySQL connection. + * @type string $password + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. + * @type \Google\Cloud\Datastream\V1\MysqlSslConfig $ssl_config + * SSL configuration for the MySQL connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname for the MySQL connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Hostname for the MySQL connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Port for the MySQL connection, default value is 3306. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Port for the MySQL connection, default value is 3306. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Required. Username for the MySQL connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username for the MySQL connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * SSL configuration for the MySQL connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSslConfig ssl_config = 5; + * @return \Google\Cloud\Datastream\V1\MysqlSslConfig|null + */ + public function getSslConfig() + { + return $this->ssl_config; + } + + public function hasSslConfig() + { + return isset($this->ssl_config); + } + + public function clearSslConfig() + { + unset($this->ssl_config); + } + + /** + * SSL configuration for the MySQL connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSslConfig ssl_config = 5; + * @param \Google\Cloud\Datastream\V1\MysqlSslConfig $var + * @return $this + */ + public function setSslConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSslConfig::class); + $this->ssl_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php new file mode 100644 index 000000000000..afbd2a990797 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php @@ -0,0 +1,67 @@ +google.cloud.datastream.v1.MysqlRdbms + */ +class MysqlRdbms extends \Google\Protobuf\Internal\Message +{ + /** + * Mysql databases on the server + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlDatabase mysql_databases = 1; + */ + private $mysql_databases; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\MysqlDatabase>|\Google\Protobuf\Internal\RepeatedField $mysql_databases + * Mysql databases on the server + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Mysql databases on the server + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlDatabase mysql_databases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMysqlDatabases() + { + return $this->mysql_databases; + } + + /** + * Mysql databases on the server + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlDatabase mysql_databases = 1; + * @param array<\Google\Cloud\Datastream\V1\MysqlDatabase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMysqlDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MysqlDatabase::class); + $this->mysql_databases = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php new file mode 100644 index 000000000000..2a76e1091653 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php @@ -0,0 +1,276 @@ +google.cloud.datastream.v1.MysqlSourceConfig + */ +class MysqlSourceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * MySQL objects to retrieve from the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms include_objects = 1; + */ + protected $include_objects = null; + /** + * MySQL objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms exclude_objects = 2; + */ + protected $exclude_objects = null; + /** + * Maximum number of concurrent CDC tasks. The number should be non negative. + * If not set (or set to 0), the system's default value will be used. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + */ + protected $max_concurrent_cdc_tasks = 0; + /** + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + */ + protected $max_concurrent_backfill_tasks = 0; + protected $cdc_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\MysqlRdbms $include_objects + * MySQL objects to retrieve from the source. + * @type \Google\Cloud\Datastream\V1\MysqlRdbms $exclude_objects + * MySQL objects to exclude from the stream. + * @type int $max_concurrent_cdc_tasks + * Maximum number of concurrent CDC tasks. The number should be non negative. + * If not set (or set to 0), the system's default value will be used. + * @type int $max_concurrent_backfill_tasks + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition $binary_log_position + * Use Binary log position based replication. + * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid $gtid + * Use GTID based replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * MySQL objects to retrieve from the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms include_objects = 1; + * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null + */ + public function getIncludeObjects() + { + return $this->include_objects; + } + + public function hasIncludeObjects() + { + return isset($this->include_objects); + } + + public function clearIncludeObjects() + { + unset($this->include_objects); + } + + /** + * MySQL objects to retrieve from the source. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms include_objects = 1; + * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var + * @return $this + */ + public function setIncludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); + $this->include_objects = $var; + + return $this; + } + + /** + * MySQL objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms exclude_objects = 2; + * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null + */ + public function getExcludeObjects() + { + return $this->exclude_objects; + } + + public function hasExcludeObjects() + { + return isset($this->exclude_objects); + } + + public function clearExcludeObjects() + { + unset($this->exclude_objects); + } + + /** + * MySQL objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms exclude_objects = 2; + * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var + * @return $this + */ + public function setExcludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); + $this->exclude_objects = $var; + + return $this; + } + + /** + * Maximum number of concurrent CDC tasks. The number should be non negative. + * If not set (or set to 0), the system's default value will be used. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + * @return int + */ + public function getMaxConcurrentCdcTasks() + { + return $this->max_concurrent_cdc_tasks; + } + + /** + * Maximum number of concurrent CDC tasks. The number should be non negative. + * If not set (or set to 0), the system's default value will be used. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + * @param int $var + * @return $this + */ + public function setMaxConcurrentCdcTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_cdc_tasks = $var; + + return $this; + } + + /** + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + * @return int + */ + public function getMaxConcurrentBackfillTasks() + { + return $this->max_concurrent_backfill_tasks; + } + + /** + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + * @param int $var + * @return $this + */ + public function setMaxConcurrentBackfillTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_backfill_tasks = $var; + + return $this; + } + + /** + * Use Binary log position based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition binary_log_position = 101; + * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition|null + */ + public function getBinaryLogPosition() + { + return $this->readOneof(101); + } + + public function hasBinaryLogPosition() + { + return $this->hasOneof(101); + } + + /** + * Use Binary log position based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition binary_log_position = 101; + * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition $var + * @return $this + */ + public function setBinaryLogPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Use GTID based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.Gtid gtid = 102; + * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid|null + */ + public function getGtid() + { + return $this->readOneof(102); + } + + public function hasGtid() + { + return $this->hasOneof(102); + } + + /** + * Use GTID based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.Gtid gtid = 102; + * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid $var + * @return $this + */ + public function setGtid($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * @return string + */ + public function getCdcMethod() + { + return $this->whichOneof("cdc_method"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php new file mode 100644 index 000000000000..5827d7781d6f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition + */ +class BinaryLogPosition extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BinaryLogPosition::class, \Google\Cloud\Datastream\V1\MysqlSourceConfig_BinaryLogPosition::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php new file mode 100644 index 000000000000..53356cfa276c --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.MysqlSourceConfig.Gtid + */ +class Gtid extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Gtid::class, \Google\Cloud\Datastream\V1\MysqlSourceConfig_Gtid::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php new file mode 100644 index 000000000000..b18f18794ac6 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php @@ -0,0 +1,257 @@ +google.cloud.datastream.v1.MysqlSslConfig + */ +class MysqlSslConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. PEM-encoded private key associated with the Client Certificate. + * If this field is used then the 'client_certificate' and the + * 'ca_certificate' fields are mandatory. + * + * Generated from protobuf field string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $client_key = ''; + /** + * Output only. Indicates whether the client_key field is set. + * + * Generated from protobuf field bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $client_key_set = false; + /** + * Input only. PEM-encoded certificate that will be used by the replica to + * authenticate against the source database server. If this field is used + * then the 'client_key' and the 'ca_certificate' fields are mandatory. + * + * Generated from protobuf field string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $client_certificate = ''; + /** + * Output only. Indicates whether the client_certificate field is set. + * + * Generated from protobuf field bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $client_certificate_set = false; + /** + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * + * Generated from protobuf field string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $ca_certificate = ''; + /** + * Output only. Indicates whether the ca_certificate field is set. + * + * Generated from protobuf field bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ca_certificate_set = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $client_key + * Input only. PEM-encoded private key associated with the Client Certificate. + * If this field is used then the 'client_certificate' and the + * 'ca_certificate' fields are mandatory. + * @type bool $client_key_set + * Output only. Indicates whether the client_key field is set. + * @type string $client_certificate + * Input only. PEM-encoded certificate that will be used by the replica to + * authenticate against the source database server. If this field is used + * then the 'client_key' and the 'ca_certificate' fields are mandatory. + * @type bool $client_certificate_set + * Output only. Indicates whether the client_certificate field is set. + * @type string $ca_certificate + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * @type bool $ca_certificate_set + * Output only. Indicates whether the ca_certificate field is set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Input only. PEM-encoded private key associated with the Client Certificate. + * If this field is used then the 'client_certificate' and the + * 'ca_certificate' fields are mandatory. + * + * Generated from protobuf field string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getClientKey() + { + return $this->client_key; + } + + /** + * Input only. PEM-encoded private key associated with the Client Certificate. + * If this field is used then the 'client_certificate' and the + * 'ca_certificate' fields are mandatory. + * + * Generated from protobuf field string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClientKey($var) + { + GPBUtil::checkString($var, True); + $this->client_key = $var; + + return $this; + } + + /** + * Output only. Indicates whether the client_key field is set. + * + * Generated from protobuf field bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getClientKeySet() + { + return $this->client_key_set; + } + + /** + * Output only. Indicates whether the client_key field is set. + * + * Generated from protobuf field bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setClientKeySet($var) + { + GPBUtil::checkBool($var); + $this->client_key_set = $var; + + return $this; + } + + /** + * Input only. PEM-encoded certificate that will be used by the replica to + * authenticate against the source database server. If this field is used + * then the 'client_key' and the 'ca_certificate' fields are mandatory. + * + * Generated from protobuf field string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + /** + * Input only. PEM-encoded certificate that will be used by the replica to + * authenticate against the source database server. If this field is used + * then the 'client_key' and the 'ca_certificate' fields are mandatory. + * + * Generated from protobuf field string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkString($var, True); + $this->client_certificate = $var; + + return $this; + } + + /** + * Output only. Indicates whether the client_certificate field is set. + * + * Generated from protobuf field bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getClientCertificateSet() + { + return $this->client_certificate_set; + } + + /** + * Output only. Indicates whether the client_certificate field is set. + * + * Generated from protobuf field bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setClientCertificateSet($var) + { + GPBUtil::checkBool($var); + $this->client_certificate_set = $var; + + return $this; + } + + /** + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * + * Generated from protobuf field string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * + * Generated from protobuf field string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * Output only. Indicates whether the ca_certificate field is set. + * + * Generated from protobuf field bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getCaCertificateSet() + { + return $this->ca_certificate_set; + } + + /** + * Output only. Indicates whether the ca_certificate field is set. + * + * Generated from protobuf field bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setCaCertificateSet($var) + { + GPBUtil::checkBool($var); + $this->ca_certificate_set = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php new file mode 100644 index 000000000000..3308503ed276 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php @@ -0,0 +1,109 @@ +google.cloud.datastream.v1.MysqlTable + */ +class MysqlTable extends \Google\Protobuf\Internal\Message +{ + /** + * Table name. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * MySQL columns in the database. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlColumn mysql_columns = 2; + */ + private $mysql_columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * Table name. + * @type array<\Google\Cloud\Datastream\V1\MysqlColumn>|\Google\Protobuf\Internal\RepeatedField $mysql_columns + * MySQL columns in the database. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Table name. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Table name. + * + * 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; + } + + /** + * MySQL columns in the database. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlColumn mysql_columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMysqlColumns() + { + return $this->mysql_columns; + } + + /** + * MySQL columns in the database. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlColumn mysql_columns = 2; + * @param array<\Google\Cloud\Datastream\V1\MysqlColumn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMysqlColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MysqlColumn::class); + $this->mysql_columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php new file mode 100644 index 000000000000..2dae14aae60b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php @@ -0,0 +1,355 @@ +google.cloud.datastream.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + /** + * Output only. Results of executed validations if there are any. + * + * Generated from protobuf field .google.cloud.datastream.v1.ValidationResult validation_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $validation_result = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * @type \Google\Cloud\Datastream\V1\ValidationResult $validation_result + * Output only. Results of executed validations if there are any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + + /** + * Output only. Results of executed validations if there are any. + * + * Generated from protobuf field .google.cloud.datastream.v1.ValidationResult validation_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Datastream\V1\ValidationResult|null + */ + public function getValidationResult() + { + return $this->validation_result; + } + + public function hasValidationResult() + { + return isset($this->validation_result); + } + + public function clearValidationResult() + { + unset($this->validation_result); + } + + /** + * Output only. Results of executed validations if there are any. + * + * Generated from protobuf field .google.cloud.datastream.v1.ValidationResult validation_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Datastream\V1\ValidationResult $var + * @return $this + */ + public function setValidationResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ValidationResult::class); + $this->validation_result = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleAsmConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleAsmConfig.php new file mode 100644 index 000000000000..d3e3f6792a09 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleAsmConfig.php @@ -0,0 +1,281 @@ +google.cloud.datastream.v1.OracleAsmConfig + */ +class OracleAsmConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname for the Oracle ASM connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Required. Port for the Oracle ASM connection. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $port = 0; + /** + * Required. Username for the Oracle ASM connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Required. Password for the Oracle ASM connection. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $password = ''; + /** + * Required. ASM service name for the Oracle ASM connection. + * + * Generated from protobuf field string asm_service = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asm_service = ''; + /** + * Optional. Connection string attributes + * + * Generated from protobuf field map connection_attributes = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $connection_attributes; + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oracle_ssl_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * Required. Hostname for the Oracle ASM connection. + * @type int $port + * Required. Port for the Oracle ASM connection. + * @type string $username + * Required. Username for the Oracle ASM connection. + * @type string $password + * Required. Password for the Oracle ASM connection. + * @type string $asm_service + * Required. ASM service name for the Oracle ASM connection. + * @type array|\Google\Protobuf\Internal\MapField $connection_attributes + * Optional. Connection string attributes + * @type \Google\Cloud\Datastream\V1\OracleSslConfig $oracle_ssl_config + * Optional. SSL configuration for the Oracle connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname for the Oracle ASM connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Hostname for the Oracle ASM connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Required. Port for the Oracle ASM connection. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Required. Port for the Oracle ASM connection. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Required. Username for the Oracle ASM connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username for the Oracle ASM connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Password for the Oracle ASM connection. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Password for the Oracle ASM connection. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Required. ASM service name for the Oracle ASM connection. + * + * Generated from protobuf field string asm_service = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAsmService() + { + return $this->asm_service; + } + + /** + * Required. ASM service name for the Oracle ASM connection. + * + * Generated from protobuf field string asm_service = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAsmService($var) + { + GPBUtil::checkString($var, True); + $this->asm_service = $var; + + return $this; + } + + /** + * Optional. Connection string attributes + * + * Generated from protobuf field map connection_attributes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getConnectionAttributes() + { + return $this->connection_attributes; + } + + /** + * Optional. Connection string attributes + * + * Generated from protobuf field map connection_attributes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setConnectionAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->connection_attributes = $arr; + + return $this; + } + + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\OracleSslConfig|null + */ + public function getOracleSslConfig() + { + return $this->oracle_ssl_config; + } + + public function hasOracleSslConfig() + { + return isset($this->oracle_ssl_config); + } + + public function clearOracleSslConfig() + { + unset($this->oracle_ssl_config); + } + + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\OracleSslConfig $var + * @return $this + */ + public function setOracleSslConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSslConfig::class); + $this->oracle_ssl_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php new file mode 100644 index 000000000000..9b6843312358 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php @@ -0,0 +1,339 @@ +google.cloud.datastream.v1.OracleColumn + */ +class OracleColumn extends \Google\Protobuf\Internal\Message +{ + /** + * Column name. + * + * Generated from protobuf field string column = 1; + */ + protected $column = ''; + /** + * The Oracle data type. + * + * Generated from protobuf field string data_type = 2; + */ + protected $data_type = ''; + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + */ + protected $length = 0; + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + */ + protected $precision = 0; + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + */ + protected $scale = 0; + /** + * Column encoding. + * + * Generated from protobuf field string encoding = 6; + */ + protected $encoding = ''; + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 7; + */ + protected $primary_key = false; + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 8; + */ + protected $nullable = false; + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 9; + */ + protected $ordinal_position = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Column name. + * @type string $data_type + * The Oracle data type. + * @type int $length + * Column length. + * @type int $precision + * Column precision. + * @type int $scale + * Column scale. + * @type string $encoding + * Column encoding. + * @type bool $primary_key + * Whether or not the column represents a primary key. + * @type bool $nullable + * Whether or not the column can accept a null value. + * @type int $ordinal_position + * The ordinal position of the column in the table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * The Oracle data type. + * + * Generated from protobuf field string data_type = 2; + * @return string + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * The Oracle data type. + * + * Generated from protobuf field string data_type = 2; + * @param string $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkString($var, True); + $this->data_type = $var; + + return $this; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + * @return int + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + * @param int $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkInt32($var); + $this->precision = $var; + + return $this; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + * @return int + */ + public function getScale() + { + return $this->scale; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + * @param int $var + * @return $this + */ + public function setScale($var) + { + GPBUtil::checkInt32($var); + $this->scale = $var; + + return $this; + } + + /** + * Column encoding. + * + * Generated from protobuf field string encoding = 6; + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Column encoding. + * + * Generated from protobuf field string encoding = 6; + * @param string $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkString($var, True); + $this->encoding = $var; + + return $this; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 7; + * @return bool + */ + public function getPrimaryKey() + { + return $this->primary_key; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 7; + * @param bool $var + * @return $this + */ + public function setPrimaryKey($var) + { + GPBUtil::checkBool($var); + $this->primary_key = $var; + + return $this; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 8; + * @return bool + */ + public function getNullable() + { + return $this->nullable; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 8; + * @param bool $var + * @return $this + */ + public function setNullable($var) + { + GPBUtil::checkBool($var); + $this->nullable = $var; + + return $this; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 9; + * @return int + */ + public function getOrdinalPosition() + { + return $this->ordinal_position; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 9; + * @param int $var + * @return $this + */ + public function setOrdinalPosition($var) + { + GPBUtil::checkInt32($var); + $this->ordinal_position = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php new file mode 100644 index 000000000000..7df5fc773678 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php @@ -0,0 +1,368 @@ +google.cloud.datastream.v1.OracleProfile + */ +class OracleProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname for the Oracle connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Port for the Oracle connection, default value is 1521. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + /** + * Required. Username for the Oracle connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $password = ''; + /** + * Required. Database for the Oracle connection. + * + * Generated from protobuf field string database_service = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_service = ''; + /** + * Connection string attributes + * + * Generated from protobuf field map connection_attributes = 6; + */ + private $connection_attributes; + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oracle_ssl_config = null; + /** + * Optional. Configuration for Oracle ASM connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oracle_asm_config = null; + /** + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * + * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $secret_manager_stored_password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * Required. Hostname for the Oracle connection. + * @type int $port + * Port for the Oracle connection, default value is 1521. + * @type string $username + * Required. Username for the Oracle connection. + * @type string $password + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. + * @type string $database_service + * Required. Database for the Oracle connection. + * @type array|\Google\Protobuf\Internal\MapField $connection_attributes + * Connection string attributes + * @type \Google\Cloud\Datastream\V1\OracleSslConfig $oracle_ssl_config + * Optional. SSL configuration for the Oracle connection. + * @type \Google\Cloud\Datastream\V1\OracleAsmConfig $oracle_asm_config + * Optional. Configuration for Oracle ASM connection. + * @type string $secret_manager_stored_password + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname for the Oracle connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Hostname for the Oracle connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Port for the Oracle connection, default value is 1521. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Port for the Oracle connection, default value is 1521. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Required. Username for the Oracle connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username for the Oracle connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Required. Database for the Oracle connection. + * + * Generated from protobuf field string database_service = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseService() + { + return $this->database_service; + } + + /** + * Required. Database for the Oracle connection. + * + * Generated from protobuf field string database_service = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseService($var) + { + GPBUtil::checkString($var, True); + $this->database_service = $var; + + return $this; + } + + /** + * Connection string attributes + * + * Generated from protobuf field map connection_attributes = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getConnectionAttributes() + { + return $this->connection_attributes; + } + + /** + * Connection string attributes + * + * Generated from protobuf field map connection_attributes = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setConnectionAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->connection_attributes = $arr; + + return $this; + } + + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\OracleSslConfig|null + */ + public function getOracleSslConfig() + { + return $this->oracle_ssl_config; + } + + public function hasOracleSslConfig() + { + return isset($this->oracle_ssl_config); + } + + public function clearOracleSslConfig() + { + unset($this->oracle_ssl_config); + } + + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\OracleSslConfig $var + * @return $this + */ + public function setOracleSslConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSslConfig::class); + $this->oracle_ssl_config = $var; + + return $this; + } + + /** + * Optional. Configuration for Oracle ASM connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\OracleAsmConfig|null + */ + public function getOracleAsmConfig() + { + return $this->oracle_asm_config; + } + + public function hasOracleAsmConfig() + { + return isset($this->oracle_asm_config); + } + + public function clearOracleAsmConfig() + { + unset($this->oracle_asm_config); + } + + /** + * Optional. Configuration for Oracle ASM connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\OracleAsmConfig $var + * @return $this + */ + public function setOracleAsmConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleAsmConfig::class); + $this->oracle_asm_config = $var; + + return $this; + } + + /** + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * + * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSecretManagerStoredPassword() + { + return $this->secret_manager_stored_password; + } + + /** + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * + * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSecretManagerStoredPassword($var) + { + GPBUtil::checkString($var, True); + $this->secret_manager_stored_password = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php new file mode 100644 index 000000000000..ca0480d6c821 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php @@ -0,0 +1,67 @@ +google.cloud.datastream.v1.OracleRdbms + */ +class OracleRdbms extends \Google\Protobuf\Internal\Message +{ + /** + * Oracle schemas/databases in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleSchema oracle_schemas = 1; + */ + private $oracle_schemas; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\OracleSchema>|\Google\Protobuf\Internal\RepeatedField $oracle_schemas + * Oracle schemas/databases in the database server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Oracle schemas/databases in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleSchema oracle_schemas = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOracleSchemas() + { + return $this->oracle_schemas; + } + + /** + * Oracle schemas/databases in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleSchema oracle_schemas = 1; + * @param array<\Google\Cloud\Datastream\V1\OracleSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOracleSchemas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\OracleSchema::class); + $this->oracle_schemas = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php new file mode 100644 index 000000000000..44b354a15ab6 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.OracleSchema + */ +class OracleSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + */ + protected $schema = ''; + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleTable oracle_tables = 2; + */ + private $oracle_tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Schema name. + * @type array<\Google\Cloud\Datastream\V1\OracleTable>|\Google\Protobuf\Internal\RepeatedField $oracle_tables + * Tables in the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleTable oracle_tables = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOracleTables() + { + return $this->oracle_tables; + } + + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleTable oracle_tables = 2; + * @param array<\Google\Cloud\Datastream\V1\OracleTable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOracleTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\OracleTable::class); + $this->oracle_tables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleScnPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleScnPosition.php new file mode 100644 index 000000000000..9458cd24a952 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleScnPosition.php @@ -0,0 +1,67 @@ +google.cloud.datastream.v1.OracleScnPosition + */ +class OracleScnPosition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. SCN number from where Logs will be read + * + * Generated from protobuf field int64 scn = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $scn = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $scn + * Required. SCN number from where Logs will be read + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. SCN number from where Logs will be read + * + * Generated from protobuf field int64 scn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getScn() + { + return $this->scn; + } + + /** + * Required. SCN number from where Logs will be read + * + * Generated from protobuf field int64 scn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setScn($var) + { + GPBUtil::checkInt64($var); + $this->scn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php new file mode 100644 index 000000000000..a0c1272ab88b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php @@ -0,0 +1,347 @@ +google.cloud.datastream.v1.OracleSourceConfig + */ +class OracleSourceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Oracle objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms include_objects = 1; + */ + protected $include_objects = null; + /** + * Oracle objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms exclude_objects = 2; + */ + protected $exclude_objects = null; + /** + * Maximum number of concurrent CDC tasks. The number should be non-negative. + * If not set (or set to 0), the system's default value is used. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + */ + protected $max_concurrent_cdc_tasks = 0; + /** + * Maximum number of concurrent backfill tasks. The number should be + * non-negative. If not set (or set to 0), the system's default value is used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + */ + protected $max_concurrent_backfill_tasks = 0; + protected $large_objects_handling; + protected $cdc_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\OracleRdbms $include_objects + * Oracle objects to include in the stream. + * @type \Google\Cloud\Datastream\V1\OracleRdbms $exclude_objects + * Oracle objects to exclude from the stream. + * @type int $max_concurrent_cdc_tasks + * Maximum number of concurrent CDC tasks. The number should be non-negative. + * If not set (or set to 0), the system's default value is used. + * @type int $max_concurrent_backfill_tasks + * Maximum number of concurrent backfill tasks. The number should be + * non-negative. If not set (or set to 0), the system's default value is used. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects $drop_large_objects + * Drop large object values. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects $stream_large_objects + * Stream large object values. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner $log_miner + * Use LogMiner. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser $binary_log_parser + * Use Binary Log Parser. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Oracle objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms include_objects = 1; + * @return \Google\Cloud\Datastream\V1\OracleRdbms|null + */ + public function getIncludeObjects() + { + return $this->include_objects; + } + + public function hasIncludeObjects() + { + return isset($this->include_objects); + } + + public function clearIncludeObjects() + { + unset($this->include_objects); + } + + /** + * Oracle objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms include_objects = 1; + * @param \Google\Cloud\Datastream\V1\OracleRdbms $var + * @return $this + */ + public function setIncludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); + $this->include_objects = $var; + + return $this; + } + + /** + * Oracle objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms exclude_objects = 2; + * @return \Google\Cloud\Datastream\V1\OracleRdbms|null + */ + public function getExcludeObjects() + { + return $this->exclude_objects; + } + + public function hasExcludeObjects() + { + return isset($this->exclude_objects); + } + + public function clearExcludeObjects() + { + unset($this->exclude_objects); + } + + /** + * Oracle objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms exclude_objects = 2; + * @param \Google\Cloud\Datastream\V1\OracleRdbms $var + * @return $this + */ + public function setExcludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); + $this->exclude_objects = $var; + + return $this; + } + + /** + * Maximum number of concurrent CDC tasks. The number should be non-negative. + * If not set (or set to 0), the system's default value is used. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + * @return int + */ + public function getMaxConcurrentCdcTasks() + { + return $this->max_concurrent_cdc_tasks; + } + + /** + * Maximum number of concurrent CDC tasks. The number should be non-negative. + * If not set (or set to 0), the system's default value is used. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + * @param int $var + * @return $this + */ + public function setMaxConcurrentCdcTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_cdc_tasks = $var; + + return $this; + } + + /** + * Maximum number of concurrent backfill tasks. The number should be + * non-negative. If not set (or set to 0), the system's default value is used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + * @return int + */ + public function getMaxConcurrentBackfillTasks() + { + return $this->max_concurrent_backfill_tasks; + } + + /** + * Maximum number of concurrent backfill tasks. The number should be + * non-negative. If not set (or set to 0), the system's default value is used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + * @param int $var + * @return $this + */ + public function setMaxConcurrentBackfillTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_backfill_tasks = $var; + + return $this; + } + + /** + * Drop large object values. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects drop_large_objects = 100; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects|null + */ + public function getDropLargeObjects() + { + return $this->readOneof(100); + } + + public function hasDropLargeObjects() + { + return $this->hasOneof(100); + } + + /** + * Drop large object values. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects drop_large_objects = 100; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects $var + * @return $this + */ + public function setDropLargeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Stream large object values. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects stream_large_objects = 102; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects|null + */ + public function getStreamLargeObjects() + { + return $this->readOneof(102); + } + + public function hasStreamLargeObjects() + { + return $this->hasOneof(102); + } + + /** + * Stream large object values. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects stream_large_objects = 102; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects $var + * @return $this + */ + public function setStreamLargeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Use LogMiner. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.LogMiner log_miner = 103; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner|null + */ + public function getLogMiner() + { + return $this->readOneof(103); + } + + public function hasLogMiner() + { + return $this->hasOneof(103); + } + + /** + * Use LogMiner. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.LogMiner log_miner = 103; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner $var + * @return $this + */ + public function setLogMiner($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * Use Binary Log Parser. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser binary_log_parser = 104; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser|null + */ + public function getBinaryLogParser() + { + return $this->readOneof(104); + } + + public function hasBinaryLogParser() + { + return $this->hasOneof(104); + } + + /** + * Use Binary Log Parser. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser binary_log_parser = 104; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser $var + * @return $this + */ + public function setBinaryLogParser($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser::class); + $this->writeOneof(104, $var); + + return $this; + } + + /** + * @return string + */ + public function getLargeObjectsHandling() + { + return $this->whichOneof("large_objects_handling"); + } + + /** + * @return string + */ + public function getCdcMethod() + { + return $this->whichOneof("cdc_method"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php new file mode 100644 index 000000000000..347cdc436294 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php @@ -0,0 +1,111 @@ +google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser + */ +class BinaryLogParser extends \Google\Protobuf\Internal\Message +{ + protected $log_file_access; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\OracleAsmLogFileAccess $oracle_asm_log_file_access + * Use Oracle ASM. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\LogFileDirectories $log_file_directories + * Use Oracle directories. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Use Oracle ASM. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess oracle_asm_log_file_access = 1; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\OracleAsmLogFileAccess|null + */ + public function getOracleAsmLogFileAccess() + { + return $this->readOneof(1); + } + + public function hasOracleAsmLogFileAccess() + { + return $this->hasOneof(1); + } + + /** + * Use Oracle ASM. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess oracle_asm_log_file_access = 1; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\OracleAsmLogFileAccess $var + * @return $this + */ + public function setOracleAsmLogFileAccess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\OracleAsmLogFileAccess::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Use Oracle directories. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories log_file_directories = 2; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\LogFileDirectories|null + */ + public function getLogFileDirectories() + { + return $this->readOneof(2); + } + + public function hasLogFileDirectories() + { + return $this->hasOneof(2); + } + + /** + * Use Oracle directories. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories log_file_directories = 2; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\LogFileDirectories $var + * @return $this + */ + public function setLogFileDirectories($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser\LogFileDirectories::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getLogFileAccess() + { + return $this->whichOneof("log_file_access"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BinaryLogParser::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_BinaryLogParser::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php new file mode 100644 index 000000000000..13282a3dce06 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php @@ -0,0 +1,104 @@ +google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.LogFileDirectories + */ +class LogFileDirectories extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Oracle directory for online logs. + * + * Generated from protobuf field string online_log_directory = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $online_log_directory = ''; + /** + * Required. Oracle directory for archived logs. + * + * Generated from protobuf field string archived_log_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $archived_log_directory = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $online_log_directory + * Required. Oracle directory for online logs. + * @type string $archived_log_directory + * Required. Oracle directory for archived logs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Oracle directory for online logs. + * + * Generated from protobuf field string online_log_directory = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOnlineLogDirectory() + { + return $this->online_log_directory; + } + + /** + * Required. Oracle directory for online logs. + * + * Generated from protobuf field string online_log_directory = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOnlineLogDirectory($var) + { + GPBUtil::checkString($var, True); + $this->online_log_directory = $var; + + return $this; + } + + /** + * Required. Oracle directory for archived logs. + * + * Generated from protobuf field string archived_log_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getArchivedLogDirectory() + { + return $this->archived_log_directory; + } + + /** + * Required. Oracle directory for archived logs. + * + * Generated from protobuf field string archived_log_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setArchivedLogDirectory($var) + { + GPBUtil::checkString($var, True); + $this->archived_log_directory = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogFileDirectories::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_BinaryLogParser_LogFileDirectories::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php new file mode 100644 index 000000000000..e5873cabc938 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser.OracleAsmLogFileAccess + */ +class OracleAsmLogFileAccess extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OracleAsmLogFileAccess::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php new file mode 100644 index 000000000000..5e8f789daa8f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects + */ +class DropLargeObjects extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DropLargeObjects::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_DropLargeObjects::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php new file mode 100644 index 000000000000..81438b0e60f7 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.OracleSourceConfig.LogMiner + */ +class LogMiner extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogMiner::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_LogMiner::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php new file mode 100644 index 000000000000..a2ee465e40b5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects + */ +class StreamLargeObjects extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StreamLargeObjects::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_StreamLargeObjects::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSslConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSslConfig.php new file mode 100644 index 000000000000..4ea02d08a2c6 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSslConfig.php @@ -0,0 +1,109 @@ +google.cloud.datastream.v1.OracleSslConfig + */ +class OracleSslConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * + * Generated from protobuf field string ca_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $ca_certificate = ''; + /** + * Output only. Indicates whether the ca_certificate field has been set for + * this Connection-Profile. + * + * Generated from protobuf field bool ca_certificate_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ca_certificate_set = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ca_certificate + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * @type bool $ca_certificate_set + * Output only. Indicates whether the ca_certificate field has been set for + * this Connection-Profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * + * Generated from protobuf field string ca_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getCaCertificate() + { + return $this->ca_certificate; + } + + /** + * Input only. PEM-encoded certificate of the CA that signed the source + * database server's certificate. + * + * Generated from protobuf field string ca_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCaCertificate($var) + { + GPBUtil::checkString($var, True); + $this->ca_certificate = $var; + + return $this; + } + + /** + * Output only. Indicates whether the ca_certificate field has been set for + * this Connection-Profile. + * + * Generated from protobuf field bool ca_certificate_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getCaCertificateSet() + { + return $this->ca_certificate_set; + } + + /** + * Output only. Indicates whether the ca_certificate field has been set for + * this Connection-Profile. + * + * Generated from protobuf field bool ca_certificate_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setCaCertificateSet($var) + { + GPBUtil::checkBool($var); + $this->ca_certificate_set = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php new file mode 100644 index 000000000000..26283f2fdb8f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php @@ -0,0 +1,109 @@ +google.cloud.datastream.v1.OracleTable + */ +class OracleTable extends \Google\Protobuf\Internal\Message +{ + /** + * Table name. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * Oracle columns in the schema. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleColumn oracle_columns = 2; + */ + private $oracle_columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * Table name. + * @type array<\Google\Cloud\Datastream\V1\OracleColumn>|\Google\Protobuf\Internal\RepeatedField $oracle_columns + * Oracle columns in the schema. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Table name. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Table name. + * + * 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; + } + + /** + * Oracle columns in the schema. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleColumn oracle_columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOracleColumns() + { + return $this->oracle_columns; + } + + /** + * Oracle columns in the schema. + * When unspecified as part of include/exclude objects, includes/excludes + * everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleColumn oracle_columns = 2; + * @param array<\Google\Cloud\Datastream\V1\OracleColumn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOracleColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\OracleColumn::class); + $this->oracle_columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php new file mode 100644 index 000000000000..aa1bed895293 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php @@ -0,0 +1,305 @@ +google.cloud.datastream.v1.PostgresqlColumn + */ +class PostgresqlColumn extends \Google\Protobuf\Internal\Message +{ + /** + * Column name. + * + * Generated from protobuf field string column = 1; + */ + protected $column = ''; + /** + * The PostgreSQL data type. + * + * Generated from protobuf field string data_type = 2; + */ + protected $data_type = ''; + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + */ + protected $length = 0; + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + */ + protected $precision = 0; + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + */ + protected $scale = 0; + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 7; + */ + protected $primary_key = false; + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 8; + */ + protected $nullable = false; + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 9; + */ + protected $ordinal_position = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Column name. + * @type string $data_type + * The PostgreSQL data type. + * @type int $length + * Column length. + * @type int $precision + * Column precision. + * @type int $scale + * Column scale. + * @type bool $primary_key + * Whether or not the column represents a primary key. + * @type bool $nullable + * Whether or not the column can accept a null value. + * @type int $ordinal_position + * The ordinal position of the column in the table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * The PostgreSQL data type. + * + * Generated from protobuf field string data_type = 2; + * @return string + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * The PostgreSQL data type. + * + * Generated from protobuf field string data_type = 2; + * @param string $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkString($var, True); + $this->data_type = $var; + + return $this; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + * @return int + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + * @param int $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkInt32($var); + $this->precision = $var; + + return $this; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + * @return int + */ + public function getScale() + { + return $this->scale; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + * @param int $var + * @return $this + */ + public function setScale($var) + { + GPBUtil::checkInt32($var); + $this->scale = $var; + + return $this; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 7; + * @return bool + */ + public function getPrimaryKey() + { + return $this->primary_key; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 7; + * @param bool $var + * @return $this + */ + public function setPrimaryKey($var) + { + GPBUtil::checkBool($var); + $this->primary_key = $var; + + return $this; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 8; + * @return bool + */ + public function getNullable() + { + return $this->nullable; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 8; + * @param bool $var + * @return $this + */ + public function setNullable($var) + { + GPBUtil::checkBool($var); + $this->nullable = $var; + + return $this; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 9; + * @return int + */ + public function getOrdinalPosition() + { + return $this->ordinal_position; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 9; + * @param int $var + * @return $this + */ + public function setOrdinalPosition($var) + { + GPBUtil::checkInt32($var); + $this->ordinal_position = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php new file mode 100644 index 000000000000..98271511af72 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php @@ -0,0 +1,207 @@ +google.cloud.datastream.v1.PostgresqlProfile + */ +class PostgresqlProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname for the PostgreSQL connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Port for the PostgreSQL connection, default value is 5432. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + /** + * Required. Username for the PostgreSQL connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $password = ''; + /** + * Required. Database for the PostgreSQL connection. + * + * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * Required. Hostname for the PostgreSQL connection. + * @type int $port + * Port for the PostgreSQL connection, default value is 5432. + * @type string $username + * Required. Username for the PostgreSQL connection. + * @type string $password + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * @type string $database + * Required. Database for the PostgreSQL connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname for the PostgreSQL connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Hostname for the PostgreSQL connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Port for the PostgreSQL connection, default value is 5432. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Port for the PostgreSQL connection, default value is 5432. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Required. Username for the PostgreSQL connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username for the PostgreSQL connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Required. Database for the PostgreSQL connection. + * + * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. Database for the PostgreSQL connection. + * + * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php new file mode 100644 index 000000000000..0d3297210dd9 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php @@ -0,0 +1,67 @@ +google.cloud.datastream.v1.PostgresqlRdbms + */ +class PostgresqlRdbms extends \Google\Protobuf\Internal\Message +{ + /** + * PostgreSQL schemas in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlSchema postgresql_schemas = 1; + */ + private $postgresql_schemas; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\PostgresqlSchema>|\Google\Protobuf\Internal\RepeatedField $postgresql_schemas + * PostgreSQL schemas in the database server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * PostgreSQL schemas in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlSchema postgresql_schemas = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPostgresqlSchemas() + { + return $this->postgresql_schemas; + } + + /** + * PostgreSQL schemas in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlSchema postgresql_schemas = 1; + * @param array<\Google\Cloud\Datastream\V1\PostgresqlSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPostgresqlSchemas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PostgresqlSchema::class); + $this->postgresql_schemas = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php new file mode 100644 index 000000000000..811620dd83bf --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.PostgresqlSchema + */ +class PostgresqlSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + */ + protected $schema = ''; + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlTable postgresql_tables = 2; + */ + private $postgresql_tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Schema name. + * @type array<\Google\Cloud\Datastream\V1\PostgresqlTable>|\Google\Protobuf\Internal\RepeatedField $postgresql_tables + * Tables in the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlTable postgresql_tables = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPostgresqlTables() + { + return $this->postgresql_tables; + } + + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlTable postgresql_tables = 2; + * @param array<\Google\Cloud\Datastream\V1\PostgresqlTable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPostgresqlTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PostgresqlTable::class); + $this->postgresql_tables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php new file mode 100644 index 000000000000..eb5591c3d90d --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php @@ -0,0 +1,239 @@ +google.cloud.datastream.v1.PostgresqlSourceConfig + */ +class PostgresqlSourceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * PostgreSQL objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1; + */ + protected $include_objects = null; + /** + * PostgreSQL objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2; + */ + protected $exclude_objects = null; + /** + * Required. Immutable. The name of the logical replication slot that's + * configured with the pgoutput plugin. + * + * Generated from protobuf field string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $replication_slot = ''; + /** + * Required. The name of the publication that includes the set of all tables + * that are defined in the stream's include_objects. + * + * Generated from protobuf field string publication = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $publication = ''; + /** + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 5; + */ + protected $max_concurrent_backfill_tasks = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $include_objects + * PostgreSQL objects to include in the stream. + * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $exclude_objects + * PostgreSQL objects to exclude from the stream. + * @type string $replication_slot + * Required. Immutable. The name of the logical replication slot that's + * configured with the pgoutput plugin. + * @type string $publication + * Required. The name of the publication that includes the set of all tables + * that are defined in the stream's include_objects. + * @type int $max_concurrent_backfill_tasks + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * PostgreSQL objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1; + * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null + */ + public function getIncludeObjects() + { + return $this->include_objects; + } + + public function hasIncludeObjects() + { + return isset($this->include_objects); + } + + public function clearIncludeObjects() + { + unset($this->include_objects); + } + + /** + * PostgreSQL objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1; + * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var + * @return $this + */ + public function setIncludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); + $this->include_objects = $var; + + return $this; + } + + /** + * PostgreSQL objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2; + * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null + */ + public function getExcludeObjects() + { + return $this->exclude_objects; + } + + public function hasExcludeObjects() + { + return isset($this->exclude_objects); + } + + public function clearExcludeObjects() + { + unset($this->exclude_objects); + } + + /** + * PostgreSQL objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2; + * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var + * @return $this + */ + public function setExcludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); + $this->exclude_objects = $var; + + return $this; + } + + /** + * Required. Immutable. The name of the logical replication slot that's + * configured with the pgoutput plugin. + * + * Generated from protobuf field string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getReplicationSlot() + { + return $this->replication_slot; + } + + /** + * Required. Immutable. The name of the logical replication slot that's + * configured with the pgoutput plugin. + * + * Generated from protobuf field string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setReplicationSlot($var) + { + GPBUtil::checkString($var, True); + $this->replication_slot = $var; + + return $this; + } + + /** + * Required. The name of the publication that includes the set of all tables + * that are defined in the stream's include_objects. + * + * Generated from protobuf field string publication = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPublication() + { + return $this->publication; + } + + /** + * Required. The name of the publication that includes the set of all tables + * that are defined in the stream's include_objects. + * + * Generated from protobuf field string publication = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPublication($var) + { + GPBUtil::checkString($var, True); + $this->publication = $var; + + return $this; + } + + /** + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 5; + * @return int + */ + public function getMaxConcurrentBackfillTasks() + { + return $this->max_concurrent_backfill_tasks; + } + + /** + * Maximum number of concurrent backfill tasks. The number should be non + * negative. If not set (or set to 0), the system's default value will be + * used. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 5; + * @param int $var + * @return $this + */ + public function setMaxConcurrentBackfillTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_backfill_tasks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php new file mode 100644 index 000000000000..27df4f452fe8 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php @@ -0,0 +1,109 @@ +google.cloud.datastream.v1.PostgresqlTable + */ +class PostgresqlTable extends \Google\Protobuf\Internal\Message +{ + /** + * Table name. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * PostgreSQL columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlColumn postgresql_columns = 2; + */ + private $postgresql_columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * Table name. + * @type array<\Google\Cloud\Datastream\V1\PostgresqlColumn>|\Google\Protobuf\Internal\RepeatedField $postgresql_columns + * PostgreSQL columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Table name. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Table name. + * + * 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; + } + + /** + * PostgreSQL columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlColumn postgresql_columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPostgresqlColumns() + { + return $this->postgresql_columns; + } + + /** + * PostgreSQL columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlColumn postgresql_columns = 2; + * @param array<\Google\Cloud\Datastream\V1\PostgresqlColumn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPostgresqlColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PostgresqlColumn::class); + $this->postgresql_columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php new file mode 100644 index 000000000000..0a12094ca2f5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php @@ -0,0 +1,350 @@ +google.cloud.datastream.v1.PrivateConnection + */ +class PrivateConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Output only. The state of the Private Connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. In case of error, the details of the error in a user-friendly + * format. + * + * Generated from protobuf field .google.cloud.datastream.v1.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * VPC Peering Config. + * + * Generated from protobuf field .google.cloud.datastream.v1.VpcPeeringConfig vpc_peering_config = 100; + */ + protected $vpc_peering_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource's name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time of the resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time of the resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels. + * @type string $display_name + * Required. Display name. + * @type int $state + * Output only. The state of the Private Connection. + * @type \Google\Cloud\Datastream\V1\Error $error + * Output only. In case of error, the details of the error in a user-friendly + * format. + * @type \Google\Cloud\Datastream\V1\VpcPeeringConfig $vpc_peering_config + * VPC Peering Config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The state of the Private Connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the Private Connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\PrivateConnection\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. In case of error, the details of the error in a user-friendly + * format. + * + * Generated from protobuf field .google.cloud.datastream.v1.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Datastream\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. In case of error, the details of the error in a user-friendly + * format. + * + * Generated from protobuf field .google.cloud.datastream.v1.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Datastream\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * VPC Peering Config. + * + * Generated from protobuf field .google.cloud.datastream.v1.VpcPeeringConfig vpc_peering_config = 100; + * @return \Google\Cloud\Datastream\V1\VpcPeeringConfig|null + */ + public function getVpcPeeringConfig() + { + return $this->vpc_peering_config; + } + + public function hasVpcPeeringConfig() + { + return isset($this->vpc_peering_config); + } + + public function clearVpcPeeringConfig() + { + unset($this->vpc_peering_config); + } + + /** + * VPC Peering Config. + * + * Generated from protobuf field .google.cloud.datastream.v1.VpcPeeringConfig vpc_peering_config = 100; + * @param \Google\Cloud\Datastream\V1\VpcPeeringConfig $var + * @return $this + */ + public function setVpcPeeringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\VpcPeeringConfig::class); + $this->vpc_peering_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php new file mode 100644 index 000000000000..55476d13a328 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php @@ -0,0 +1,85 @@ +google.cloud.datastream.v1.PrivateConnection.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The private connection is in creation state - creating resources. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The private connection has been created with all of its resources. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * The private connection creation has failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + /** + * The private connection is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Delete request has failed, resource is in invalid state. + * + * Generated from protobuf enum FAILED_TO_DELETE = 5; + */ + const FAILED_TO_DELETE = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::FAILED => 'FAILED', + self::DELETING => 'DELETING', + self::FAILED_TO_DELETE => 'FAILED_TO_DELETE', + ]; + + 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(State::class, \Google\Cloud\Datastream\V1\PrivateConnection_State::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php new file mode 100644 index 000000000000..4ce213398a70 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php @@ -0,0 +1,71 @@ +google.cloud.datastream.v1.PrivateConnectivity + */ +class PrivateConnectivity extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A reference to a private connection resource. + * Format: `projects/{project}/locations/{location}/privateConnections/{name}` + * + * Generated from protobuf field string private_connection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $private_connection = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $private_connection + * Required. A reference to a private connection resource. + * Format: `projects/{project}/locations/{location}/privateConnections/{name}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. A reference to a private connection resource. + * Format: `projects/{project}/locations/{location}/privateConnections/{name}` + * + * Generated from protobuf field string private_connection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPrivateConnection() + { + return $this->private_connection; + } + + /** + * Required. A reference to a private connection resource. + * Format: `projects/{project}/locations/{location}/privateConnections/{name}` + * + * Generated from protobuf field string private_connection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPrivateConnection($var) + { + GPBUtil::checkString($var, True); + $this->private_connection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php new file mode 100644 index 000000000000..d6442b1f2852 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php @@ -0,0 +1,292 @@ +google.cloud.datastream.v1.Route + */ +class Route extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Destination address for connection + * + * Generated from protobuf field string destination_address = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_address = ''; + /** + * Destination port for connection + * + * Generated from protobuf field int32 destination_port = 7; + */ + protected $destination_port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource's name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create time of the resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update time of the resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels. + * @type string $display_name + * Required. Display name. + * @type string $destination_address + * Required. Destination address for connection + * @type int $destination_port + * Destination port for connection + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update time of the resource. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Destination address for connection + * + * Generated from protobuf field string destination_address = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestinationAddress() + { + return $this->destination_address; + } + + /** + * Required. Destination address for connection + * + * Generated from protobuf field string destination_address = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestinationAddress($var) + { + GPBUtil::checkString($var, True); + $this->destination_address = $var; + + return $this; + } + + /** + * Destination port for connection + * + * Generated from protobuf field int32 destination_port = 7; + * @return int + */ + public function getDestinationPort() + { + return $this->destination_port; + } + + /** + * Destination port for connection + * + * Generated from protobuf field int32 destination_port = 7; + * @param int $var + * @return $this + */ + public function setDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->destination_port = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/RunStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/RunStreamRequest.php new file mode 100644 index 000000000000..962e39622d4a --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/RunStreamRequest.php @@ -0,0 +1,153 @@ +google.cloud.datastream.v1.RunStreamRequest + */ +class RunStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream resource to start, in the format: + * projects/{project_id}/locations/{location}/streams/{stream_name} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The CDC strategy of the stream. If not set, the system's default + * value will be used. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy cdc_strategy = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cdc_strategy = null; + /** + * Optional. Update the stream without validating it. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the stream resource to start, in the format: + * projects/{project_id}/locations/{location}/streams/{stream_name} + * @type \Google\Cloud\Datastream\V1\CdcStrategy $cdc_strategy + * Optional. The CDC strategy of the stream. If not set, the system's default + * value will be used. + * @type bool $force + * Optional. Update the stream without validating it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream resource to start, in the format: + * projects/{project_id}/locations/{location}/streams/{stream_name} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the stream resource to start, in the format: + * projects/{project_id}/locations/{location}/streams/{stream_name} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The CDC strategy of the stream. If not set, the system's default + * value will be used. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy cdc_strategy = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\CdcStrategy|null + */ + public function getCdcStrategy() + { + return $this->cdc_strategy; + } + + public function hasCdcStrategy() + { + return isset($this->cdc_strategy); + } + + public function clearCdcStrategy() + { + unset($this->cdc_strategy); + } + + /** + * Optional. The CDC strategy of the stream. If not set, the system's default + * value will be used. + * + * Generated from protobuf field .google.cloud.datastream.v1.CdcStrategy cdc_strategy = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\CdcStrategy $var + * @return $this + */ + public function setCdcStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\CdcStrategy::class); + $this->cdc_strategy = $var; + + return $this; + } + + /** + * Optional. Update the stream without validating it. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. Update the stream without validating it. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php new file mode 100644 index 000000000000..6d1f9348d6e8 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php @@ -0,0 +1,212 @@ +google.cloud.datastream.v1.SourceConfig + */ +class SourceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Source connection profile resoource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * + * Generated from protobuf field string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source_connection_profile = ''; + protected $source_stream_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_connection_profile + * Required. Source connection profile resoource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig $oracle_source_config + * Oracle data source configuration. + * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig $mysql_source_config + * MySQL data source configuration. + * @type \Google\Cloud\Datastream\V1\PostgresqlSourceConfig $postgresql_source_config + * PostgreSQL data source configuration. + * @type \Google\Cloud\Datastream\V1\SqlServerSourceConfig $sql_server_source_config + * SQLServer data source configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Source connection profile resoource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * + * Generated from protobuf field string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceConnectionProfile() + { + return $this->source_connection_profile; + } + + /** + * Required. Source connection profile resoource. + * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` + * + * Generated from protobuf field string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceConnectionProfile($var) + { + GPBUtil::checkString($var, True); + $this->source_connection_profile = $var; + + return $this; + } + + /** + * Oracle data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig|null + */ + public function getOracleSourceConfig() + { + return $this->readOneof(100); + } + + public function hasOracleSourceConfig() + { + return $this->hasOneof(100); + } + + /** + * Oracle data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig $var + * @return $this + */ + public function setOracleSourceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * MySQL data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101; + * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig|null + */ + public function getMysqlSourceConfig() + { + return $this->readOneof(101); + } + + public function hasMysqlSourceConfig() + { + return $this->hasOneof(101); + } + + /** + * MySQL data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101; + * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig $var + * @return $this + */ + public function setMysqlSourceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * PostgreSQL data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102; + * @return \Google\Cloud\Datastream\V1\PostgresqlSourceConfig|null + */ + public function getPostgresqlSourceConfig() + { + return $this->readOneof(102); + } + + public function hasPostgresqlSourceConfig() + { + return $this->hasOneof(102); + } + + /** + * PostgreSQL data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102; + * @param \Google\Cloud\Datastream\V1\PostgresqlSourceConfig $var + * @return $this + */ + public function setPostgresqlSourceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlSourceConfig::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * SQLServer data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerSourceConfig sql_server_source_config = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerSourceConfig|null + */ + public function getSqlServerSourceConfig() + { + return $this->readOneof(103); + } + + public function hasSqlServerSourceConfig() + { + return $this->hasOneof(103); + } + + /** + * SQLServer data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerSourceConfig sql_server_source_config = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerSourceConfig $var + * @return $this + */ + public function setSqlServerSourceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerSourceConfig::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceStreamConfig() + { + return $this->whichOneof("source_stream_config"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php new file mode 100644 index 000000000000..55441bf10169 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php @@ -0,0 +1,174 @@ +google.cloud.datastream.v1.SourceObjectIdentifier + */ +class SourceObjectIdentifier extends \Google\Protobuf\Internal\Message +{ + protected $source_identifier; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier $oracle_identifier + * Oracle data source object identifier. + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier $mysql_identifier + * Mysql data source object identifier. + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier $postgresql_identifier + * PostgreSQL data source object identifier. + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier $sql_server_identifier + * SQLServer data source object identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Oracle data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier oracle_identifier = 1; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier|null + */ + public function getOracleIdentifier() + { + return $this->readOneof(1); + } + + public function hasOracleIdentifier() + { + return $this->hasOneof(1); + } + + /** + * Oracle data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier oracle_identifier = 1; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier $var + * @return $this + */ + public function setOracleIdentifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Mysql data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier mysql_identifier = 2; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier|null + */ + public function getMysqlIdentifier() + { + return $this->readOneof(2); + } + + public function hasMysqlIdentifier() + { + return $this->hasOneof(2); + } + + /** + * Mysql data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier mysql_identifier = 2; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier $var + * @return $this + */ + public function setMysqlIdentifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * PostgreSQL data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier postgresql_identifier = 3; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier|null + */ + public function getPostgresqlIdentifier() + { + return $this->readOneof(3); + } + + public function hasPostgresqlIdentifier() + { + return $this->hasOneof(3); + } + + /** + * PostgreSQL data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier postgresql_identifier = 3; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier $var + * @return $this + */ + public function setPostgresqlIdentifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * SQLServer data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier sql_server_identifier = 4; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier|null + */ + public function getSqlServerIdentifier() + { + return $this->readOneof(4); + } + + public function hasSqlServerIdentifier() + { + return $this->hasOneof(4); + } + + /** + * SQLServer data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier sql_server_identifier = 4; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier $var + * @return $this + */ + public function setSqlServerIdentifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceIdentifier() + { + return $this->whichOneof("source_identifier"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php new file mode 100644 index 000000000000..3ea4813f9416 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php @@ -0,0 +1,104 @@ +google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier + */ +class MysqlObjectIdentifier extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. + * @type string $table + * Required. The table name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MysqlObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_MysqlObjectIdentifier::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php new file mode 100644 index 000000000000..472b7baa2c9a --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php @@ -0,0 +1,104 @@ +google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier + */ +class OracleObjectIdentifier extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = ''; + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Required. The schema name. + * @type string $table + * Required. The table name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OracleObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_OracleObjectIdentifier::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php new file mode 100644 index 000000000000..09ac2062ba68 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php @@ -0,0 +1,104 @@ +google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier + */ +class PostgresqlObjectIdentifier extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = ''; + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Required. The schema name. + * @type string $table + * Required. The table name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostgresqlObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_PostgresqlObjectIdentifier::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php new file mode 100644 index 000000000000..0799b2d3f36f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php @@ -0,0 +1,104 @@ +google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier + */ +class SqlServerObjectIdentifier extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schema = ''; + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Required. The schema name. + * @type string $table + * Required. The table name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Required. The schema name. + * + * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Required. The table name. + * + * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SqlServerObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_SqlServerObjectIdentifier::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerChangeTables.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerChangeTables.php new file mode 100644 index 000000000000..929cc00fbecd --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerChangeTables.php @@ -0,0 +1,33 @@ +google.cloud.datastream.v1.SqlServerChangeTables + */ +class SqlServerChangeTables extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerColumn.php new file mode 100644 index 000000000000..a97bea45e9c8 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerColumn.php @@ -0,0 +1,305 @@ +google.cloud.datastream.v1.SqlServerColumn + */ +class SqlServerColumn extends \Google\Protobuf\Internal\Message +{ + /** + * Column name. + * + * Generated from protobuf field string column = 1; + */ + protected $column = ''; + /** + * The SQLServer data type. + * + * Generated from protobuf field string data_type = 2; + */ + protected $data_type = ''; + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + */ + protected $length = 0; + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + */ + protected $precision = 0; + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + */ + protected $scale = 0; + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 6; + */ + protected $primary_key = false; + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 7; + */ + protected $nullable = false; + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 8; + */ + protected $ordinal_position = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $column + * Column name. + * @type string $data_type + * The SQLServer data type. + * @type int $length + * Column length. + * @type int $precision + * Column precision. + * @type int $scale + * Column scale. + * @type bool $primary_key + * Whether or not the column represents a primary key. + * @type bool $nullable + * Whether or not the column can accept a null value. + * @type int $ordinal_position + * The ordinal position of the column in the table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @return string + */ + public function getColumn() + { + return $this->column; + } + + /** + * Column name. + * + * Generated from protobuf field string column = 1; + * @param string $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkString($var, True); + $this->column = $var; + + return $this; + } + + /** + * The SQLServer data type. + * + * Generated from protobuf field string data_type = 2; + * @return string + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * The SQLServer data type. + * + * Generated from protobuf field string data_type = 2; + * @param string $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkString($var, True); + $this->data_type = $var; + + return $this; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Column length. + * + * Generated from protobuf field int32 length = 3; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + * @return int + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * Column precision. + * + * Generated from protobuf field int32 precision = 4; + * @param int $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkInt32($var); + $this->precision = $var; + + return $this; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + * @return int + */ + public function getScale() + { + return $this->scale; + } + + /** + * Column scale. + * + * Generated from protobuf field int32 scale = 5; + * @param int $var + * @return $this + */ + public function setScale($var) + { + GPBUtil::checkInt32($var); + $this->scale = $var; + + return $this; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 6; + * @return bool + */ + public function getPrimaryKey() + { + return $this->primary_key; + } + + /** + * Whether or not the column represents a primary key. + * + * Generated from protobuf field bool primary_key = 6; + * @param bool $var + * @return $this + */ + public function setPrimaryKey($var) + { + GPBUtil::checkBool($var); + $this->primary_key = $var; + + return $this; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 7; + * @return bool + */ + public function getNullable() + { + return $this->nullable; + } + + /** + * Whether or not the column can accept a null value. + * + * Generated from protobuf field bool nullable = 7; + * @param bool $var + * @return $this + */ + public function setNullable($var) + { + GPBUtil::checkBool($var); + $this->nullable = $var; + + return $this; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 8; + * @return int + */ + public function getOrdinalPosition() + { + return $this->ordinal_position; + } + + /** + * The ordinal position of the column in the table. + * + * Generated from protobuf field int32 ordinal_position = 8; + * @param int $var + * @return $this + */ + public function setOrdinalPosition($var) + { + GPBUtil::checkInt32($var); + $this->ordinal_position = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerLsnPosition.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerLsnPosition.php new file mode 100644 index 000000000000..fa1e3a506263 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerLsnPosition.php @@ -0,0 +1,67 @@ +google.cloud.datastream.v1.SqlServerLsnPosition + */ +class SqlServerLsnPosition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Log sequence number (LSN) from where Logs will be read + * + * Generated from protobuf field string lsn = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lsn = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $lsn + * Required. Log sequence number (LSN) from where Logs will be read + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Log sequence number (LSN) from where Logs will be read + * + * Generated from protobuf field string lsn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLsn() + { + return $this->lsn; + } + + /** + * Required. Log sequence number (LSN) from where Logs will be read + * + * Generated from protobuf field string lsn = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLsn($var) + { + GPBUtil::checkString($var, True); + $this->lsn = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerProfile.php new file mode 100644 index 000000000000..5540808c0923 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerProfile.php @@ -0,0 +1,208 @@ +google.cloud.datastream.v1.SqlServerProfile + */ +class SqlServerProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Hostname for the SQLServer connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hostname = ''; + /** + * Port for the SQLServer connection, default value is 1433. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + /** + * Required. Username for the SQLServer connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Optional. Password for the SQLServer connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $password = ''; + /** + * Required. Database for the SQLServer connection. + * + * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * Required. Hostname for the SQLServer connection. + * @type int $port + * Port for the SQLServer connection, default value is 1433. + * @type string $username + * Required. Username for the SQLServer connection. + * @type string $password + * Optional. Password for the SQLServer connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * @type string $database + * Required. Database for the SQLServer connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Hostname for the SQLServer connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Required. Hostname for the SQLServer connection. + * + * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Port for the SQLServer connection, default value is 1433. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Port for the SQLServer connection, default value is 1433. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Required. Username for the SQLServer connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username for the SQLServer connection. + * + * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Optional. Password for the SQLServer connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Optional. Password for the SQLServer connection. Mutually exclusive with + * the `secret_manager_stored_password` field. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Required. Database for the SQLServer connection. + * + * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. Database for the SQLServer connection. + * + * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerRdbms.php new file mode 100644 index 000000000000..7b49c9b37683 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerRdbms.php @@ -0,0 +1,67 @@ +google.cloud.datastream.v1.SqlServerRdbms + */ +class SqlServerRdbms extends \Google\Protobuf\Internal\Message +{ + /** + * SQLServer schemas in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerSchema schemas = 1; + */ + private $schemas; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\SqlServerSchema>|\Google\Protobuf\Internal\RepeatedField $schemas + * SQLServer schemas in the database server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * SQLServer schemas in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerSchema schemas = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchemas() + { + return $this->schemas; + } + + /** + * SQLServer schemas in the database server. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerSchema schemas = 1; + * @param array<\Google\Cloud\Datastream\V1\SqlServerSchema>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchemas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\SqlServerSchema::class); + $this->schemas = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSchema.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSchema.php new file mode 100644 index 000000000000..3b05f7da6bf6 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSchema.php @@ -0,0 +1,101 @@ +google.cloud.datastream.v1.SqlServerSchema + */ +class SqlServerSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + */ + protected $schema = ''; + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerTable tables = 2; + */ + private $tables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Schema name. + * @type array<\Google\Cloud\Datastream\V1\SqlServerTable>|\Google\Protobuf\Internal\RepeatedField $tables + * Tables in the schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Schema name. + * + * Generated from protobuf field string schema = 1; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerTable tables = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTables() + { + return $this->tables; + } + + /** + * Tables in the schema. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerTable tables = 2; + * @param array<\Google\Cloud\Datastream\V1\SqlServerTable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\SqlServerTable::class); + $this->tables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSourceConfig.php new file mode 100644 index 000000000000..0cbdc1f5430b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSourceConfig.php @@ -0,0 +1,264 @@ +google.cloud.datastream.v1.SqlServerSourceConfig + */ +class SqlServerSourceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * SQLServer objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms include_objects = 1; + */ + protected $include_objects = null; + /** + * SQLServer objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms exclude_objects = 2; + */ + protected $exclude_objects = null; + /** + * Max concurrent CDC tasks. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + */ + protected $max_concurrent_cdc_tasks = 0; + /** + * Max concurrent backfill tasks. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + */ + protected $max_concurrent_backfill_tasks = 0; + protected $cdc_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $include_objects + * SQLServer objects to include in the stream. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $exclude_objects + * SQLServer objects to exclude from the stream. + * @type int $max_concurrent_cdc_tasks + * Max concurrent CDC tasks. + * @type int $max_concurrent_backfill_tasks + * Max concurrent backfill tasks. + * @type \Google\Cloud\Datastream\V1\SqlServerTransactionLogs $transaction_logs + * CDC reader reads from transaction logs. + * @type \Google\Cloud\Datastream\V1\SqlServerChangeTables $change_tables + * CDC reader reads from change tables. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * SQLServer objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms include_objects = 1; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getIncludeObjects() + { + return $this->include_objects; + } + + public function hasIncludeObjects() + { + return isset($this->include_objects); + } + + public function clearIncludeObjects() + { + unset($this->include_objects); + } + + /** + * SQLServer objects to include in the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms include_objects = 1; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setIncludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->include_objects = $var; + + return $this; + } + + /** + * SQLServer objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms exclude_objects = 2; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getExcludeObjects() + { + return $this->exclude_objects; + } + + public function hasExcludeObjects() + { + return isset($this->exclude_objects); + } + + public function clearExcludeObjects() + { + unset($this->exclude_objects); + } + + /** + * SQLServer objects to exclude from the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms exclude_objects = 2; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setExcludeObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->exclude_objects = $var; + + return $this; + } + + /** + * Max concurrent CDC tasks. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + * @return int + */ + public function getMaxConcurrentCdcTasks() + { + return $this->max_concurrent_cdc_tasks; + } + + /** + * Max concurrent CDC tasks. + * + * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; + * @param int $var + * @return $this + */ + public function setMaxConcurrentCdcTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_cdc_tasks = $var; + + return $this; + } + + /** + * Max concurrent backfill tasks. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + * @return int + */ + public function getMaxConcurrentBackfillTasks() + { + return $this->max_concurrent_backfill_tasks; + } + + /** + * Max concurrent backfill tasks. + * + * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; + * @param int $var + * @return $this + */ + public function setMaxConcurrentBackfillTasks($var) + { + GPBUtil::checkInt32($var); + $this->max_concurrent_backfill_tasks = $var; + + return $this; + } + + /** + * CDC reader reads from transaction logs. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerTransactionLogs transaction_logs = 101; + * @return \Google\Cloud\Datastream\V1\SqlServerTransactionLogs|null + */ + public function getTransactionLogs() + { + return $this->readOneof(101); + } + + public function hasTransactionLogs() + { + return $this->hasOneof(101); + } + + /** + * CDC reader reads from transaction logs. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerTransactionLogs transaction_logs = 101; + * @param \Google\Cloud\Datastream\V1\SqlServerTransactionLogs $var + * @return $this + */ + public function setTransactionLogs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerTransactionLogs::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * CDC reader reads from change tables. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerChangeTables change_tables = 102; + * @return \Google\Cloud\Datastream\V1\SqlServerChangeTables|null + */ + public function getChangeTables() + { + return $this->readOneof(102); + } + + public function hasChangeTables() + { + return $this->hasOneof(102); + } + + /** + * CDC reader reads from change tables. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerChangeTables change_tables = 102; + * @param \Google\Cloud\Datastream\V1\SqlServerChangeTables $var + * @return $this + */ + public function setChangeTables($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerChangeTables::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * @return string + */ + public function getCdcMethod() + { + return $this->whichOneof("cdc_method"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTable.php new file mode 100644 index 000000000000..ca85294d95e1 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTable.php @@ -0,0 +1,109 @@ +google.cloud.datastream.v1.SqlServerTable + */ +class SqlServerTable extends \Google\Protobuf\Internal\Message +{ + /** + * Table name. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * SQLServer columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerColumn columns = 2; + */ + private $columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * Table name. + * @type array<\Google\Cloud\Datastream\V1\SqlServerColumn>|\Google\Protobuf\Internal\RepeatedField $columns + * SQLServer columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Table name. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Table name. + * + * 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; + } + + /** + * SQLServer columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerColumn columns = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * SQLServer columns in the schema. + * When unspecified as part of include/exclude objects, + * includes/excludes everything. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.SqlServerColumn columns = 2; + * @param array<\Google\Cloud\Datastream\V1\SqlServerColumn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\SqlServerColumn::class); + $this->columns = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTransactionLogs.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTransactionLogs.php new file mode 100644 index 000000000000..eb2e58697b9a --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTransactionLogs.php @@ -0,0 +1,33 @@ +google.cloud.datastream.v1.SqlServerTransactionLogs + */ +class SqlServerTransactionLogs extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php new file mode 100644 index 000000000000..fe03b89f447b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php @@ -0,0 +1,86 @@ +google.cloud.datastream.v1.StartBackfillJobRequest + */ +class StartBackfillJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream object resource to start a backfill job + * for. + * + * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $object = ''; + + /** + * @param string $object Required. The name of the stream object resource to start a backfill job + * for. Please see + * {@see DatastreamClient::streamObjectName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\StartBackfillJobRequest + * + * @experimental + */ + public static function build(string $object): self + { + return (new self()) + ->setObject($object); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $object + * Required. The name of the stream object resource to start a backfill job + * for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream object resource to start a backfill job + * for. + * + * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Required. The name of the stream object resource to start a backfill job + * for. + * + * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php new file mode 100644 index 000000000000..8ef6648c840d --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php @@ -0,0 +1,77 @@ +google.cloud.datastream.v1.StartBackfillJobResponse + */ +class StartBackfillJobResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The stream object resource a backfill job was started for. + * + * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; + */ + protected $object = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\StreamObject $object + * The stream object resource a backfill job was started for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * The stream object resource a backfill job was started for. + * + * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; + * @return \Google\Cloud\Datastream\V1\StreamObject|null + */ + public function getObject() + { + return $this->object; + } + + public function hasObject() + { + return isset($this->object); + } + + public function clearObject() + { + unset($this->object); + } + + /** + * The stream object resource a backfill job was started for. + * + * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; + * @param \Google\Cloud\Datastream\V1\StreamObject $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\StreamObject::class); + $this->object = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php new file mode 100644 index 000000000000..d882743d2335 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php @@ -0,0 +1,35 @@ +google.cloud.datastream.v1.StaticServiceIpConnectivity + */ +class StaticServiceIpConnectivity extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php new file mode 100644 index 000000000000..c334820dcc5f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php @@ -0,0 +1,87 @@ +google.cloud.datastream.v1.StopBackfillJobRequest + */ +class StopBackfillJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream object resource to stop the backfill job + * for. + * + * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $object = ''; + + /** + * @param string $object Required. The name of the stream object resource to stop the backfill job + * for. Please see + * {@see DatastreamClient::streamObjectName()} for help formatting this field. + * + * @return \Google\Cloud\Datastream\V1\StopBackfillJobRequest + * + * @experimental + */ + public static function build(string $object): self + { + return (new self()) + ->setObject($object); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $object + * Required. The name of the stream object resource to stop the backfill job + * for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream object resource to stop the backfill job + * for. + * + * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Required. The name of the stream object resource to stop the backfill job + * for. + * + * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php new file mode 100644 index 000000000000..636cec779845 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php @@ -0,0 +1,77 @@ +google.cloud.datastream.v1.StopBackfillJobResponse + */ +class StopBackfillJobResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The stream object resource the backfill job was stopped for. + * + * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; + */ + protected $object = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\StreamObject $object + * The stream object resource the backfill job was stopped for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * The stream object resource the backfill job was stopped for. + * + * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; + * @return \Google\Cloud\Datastream\V1\StreamObject|null + */ + public function getObject() + { + return $this->object; + } + + public function hasObject() + { + return isset($this->object); + } + + public function clearObject() + { + unset($this->object); + } + + /** + * The stream object resource the backfill job was stopped for. + * + * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; + * @param \Google\Cloud\Datastream\V1\StreamObject $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\StreamObject::class); + $this->object = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php new file mode 100644 index 000000000000..031abfdec7bf --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php @@ -0,0 +1,561 @@ +google.cloud.datastream.v1.Stream + */ +class Stream extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The stream's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The creation time of the stream. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update time of the stream. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Source connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_config = null; + /** + * Required. Destination connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_config = null; + /** + * The state of the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.State state = 8; + */ + protected $state = 0; + /** + * Output only. Errors on the Stream. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Immutable. A reference to a KMS encryption key. + * If provided, it will be used to encrypt the data. + * If left blank, data will be encrypted using an internal Stream-specific + * encryption key provisioned through KMS. + * + * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $customer_managed_encryption_key = null; + /** + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * + * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_recovery_time = null; + protected $backfill_strategy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The stream's name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the stream. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update time of the stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels. + * @type string $display_name + * Required. Display name. + * @type \Google\Cloud\Datastream\V1\SourceConfig $source_config + * Required. Source connection profile configuration. + * @type \Google\Cloud\Datastream\V1\DestinationConfig $destination_config + * Required. Destination connection profile configuration. + * @type int $state + * The state of the stream. + * @type \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy $backfill_all + * Automatically backfill objects included in the stream source + * configuration. Specific objects can be excluded. + * @type \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy $backfill_none + * Do not automatically backfill any objects. + * @type array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. Errors on the Stream. + * @type string $customer_managed_encryption_key + * Immutable. A reference to a KMS encryption key. + * If provided, it will be used to encrypt the data. + * If left blank, data will be encrypted using an internal Stream-specific + * encryption key provisioned through KMS. + * @type \Google\Protobuf\Timestamp $last_recovery_time + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The stream's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The stream's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The creation time of the stream. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time of the stream. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update time of the stream. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update time of the stream. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Source connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\SourceConfig|null + */ + public function getSourceConfig() + { + return $this->source_config; + } + + public function hasSourceConfig() + { + return isset($this->source_config); + } + + public function clearSourceConfig() + { + unset($this->source_config); + } + + /** + * Required. Source connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\SourceConfig $var + * @return $this + */ + public function setSourceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceConfig::class); + $this->source_config = $var; + + return $this; + } + + /** + * Required. Destination connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\DestinationConfig|null + */ + public function getDestinationConfig() + { + return $this->destination_config; + } + + public function hasDestinationConfig() + { + return isset($this->destination_config); + } + + public function clearDestinationConfig() + { + unset($this->destination_config); + } + + /** + * Required. Destination connection profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\DestinationConfig $var + * @return $this + */ + public function setDestinationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\DestinationConfig::class); + $this->destination_config = $var; + + return $this; + } + + /** + * The state of the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.State state = 8; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the stream. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.State state = 8; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\Stream\State::class); + $this->state = $var; + + return $this; + } + + /** + * Automatically backfill objects included in the stream source + * configuration. Specific objects can be excluded. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; + * @return \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy|null + */ + public function getBackfillAll() + { + return $this->readOneof(101); + } + + public function hasBackfillAll() + { + return $this->hasOneof(101); + } + + /** + * Automatically backfill objects included in the stream source + * configuration. Specific objects can be excluded. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; + * @param \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy $var + * @return $this + */ + public function setBackfillAll($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Do not automatically backfill any objects. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; + * @return \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy|null + */ + public function getBackfillNone() + { + return $this->readOneof(102); + } + + public function hasBackfillNone() + { + return $this->hasOneof(102); + } + + /** + * Do not automatically backfill any objects. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; + * @param \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy $var + * @return $this + */ + public function setBackfillNone($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Output only. Errors on the Stream. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. Errors on the Stream. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Error::class); + $this->errors = $arr; + + return $this; + } + + /** + * Immutable. A reference to a KMS encryption key. + * If provided, it will be used to encrypt the data. + * If left blank, data will be encrypted using an internal Stream-specific + * encryption key provisioned through KMS. + * + * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getCustomerManagedEncryptionKey() + { + return isset($this->customer_managed_encryption_key) ? $this->customer_managed_encryption_key : ''; + } + + public function hasCustomerManagedEncryptionKey() + { + return isset($this->customer_managed_encryption_key); + } + + public function clearCustomerManagedEncryptionKey() + { + unset($this->customer_managed_encryption_key); + } + + /** + * Immutable. A reference to a KMS encryption key. + * If provided, it will be used to encrypt the data. + * If left blank, data will be encrypted using an internal Stream-specific + * encryption key provisioned through KMS. + * + * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setCustomerManagedEncryptionKey($var) + { + GPBUtil::checkString($var, True); + $this->customer_managed_encryption_key = $var; + + return $this; + } + + /** + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * + * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastRecoveryTime() + { + return $this->last_recovery_time; + } + + public function hasLastRecoveryTime() + { + return isset($this->last_recovery_time); + } + + public function clearLastRecoveryTime() + { + unset($this->last_recovery_time); + } + + /** + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * + * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastRecoveryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_recovery_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getBackfillStrategy() + { + return $this->whichOneof("backfill_strategy"); + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php new file mode 100644 index 000000000000..c4aff97c35f9 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php @@ -0,0 +1,178 @@ +google.cloud.datastream.v1.Stream.BackfillAllStrategy + */ +class BackfillAllStrategy extends \Google\Protobuf\Internal\Message +{ + protected $excluded_objects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Datastream\V1\OracleRdbms $oracle_excluded_objects + * Oracle data source objects to avoid backfilling. + * @type \Google\Cloud\Datastream\V1\MysqlRdbms $mysql_excluded_objects + * MySQL data source objects to avoid backfilling. + * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_excluded_objects + * PostgreSQL data source objects to avoid backfilling. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_excluded_objects + * SQLServer data source objects to avoid backfilling + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Oracle data source objects to avoid backfilling. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; + * @return \Google\Cloud\Datastream\V1\OracleRdbms|null + */ + public function getOracleExcludedObjects() + { + return $this->readOneof(1); + } + + public function hasOracleExcludedObjects() + { + return $this->hasOneof(1); + } + + /** + * Oracle data source objects to avoid backfilling. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; + * @param \Google\Cloud\Datastream\V1\OracleRdbms $var + * @return $this + */ + public function setOracleExcludedObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * MySQL data source objects to avoid backfilling. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; + * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null + */ + public function getMysqlExcludedObjects() + { + return $this->readOneof(2); + } + + public function hasMysqlExcludedObjects() + { + return $this->hasOneof(2); + } + + /** + * MySQL data source objects to avoid backfilling. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; + * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var + * @return $this + */ + public function setMysqlExcludedObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * PostgreSQL data source objects to avoid backfilling. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_excluded_objects = 3; + * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null + */ + public function getPostgresqlExcludedObjects() + { + return $this->readOneof(3); + } + + public function hasPostgresqlExcludedObjects() + { + return $this->hasOneof(3); + } + + /** + * PostgreSQL data source objects to avoid backfilling. + * + * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_excluded_objects = 3; + * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var + * @return $this + */ + public function setPostgresqlExcludedObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * SQLServer data source objects to avoid backfilling + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_excluded_objects = 4; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getSqlServerExcludedObjects() + { + return $this->readOneof(4); + } + + public function hasSqlServerExcludedObjects() + { + return $this->hasOneof(4); + } + + /** + * SQLServer data source objects to avoid backfilling + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_excluded_objects = 4; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setSqlServerExcludedObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getExcludedObjects() + { + return $this->whichOneof("excluded_objects"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackfillAllStrategy::class, \Google\Cloud\Datastream\V1\Stream_BackfillAllStrategy::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php new file mode 100644 index 000000000000..8cf4fdad74ac --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php @@ -0,0 +1,36 @@ +google.cloud.datastream.v1.Stream.BackfillNoneStrategy + */ +class BackfillNoneStrategy extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackfillNoneStrategy::class, \Google\Cloud\Datastream\V1\Stream_BackfillNoneStrategy::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php new file mode 100644 index 000000000000..12121c22f75b --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php @@ -0,0 +1,109 @@ +google.cloud.datastream.v1.Stream.State + */ +class State +{ + /** + * Unspecified stream state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The stream has been created but has not yet started streaming data. + * + * Generated from protobuf enum NOT_STARTED = 1; + */ + const NOT_STARTED = 1; + /** + * The stream is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The stream is paused. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * The stream is in maintenance mode. + * Updates are rejected on the resource in this state. + * + * Generated from protobuf enum MAINTENANCE = 4; + */ + const MAINTENANCE = 4; + /** + * The stream is experiencing an error that is preventing data from being + * streamed. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The stream has experienced a terminal failure. + * + * Generated from protobuf enum FAILED_PERMANENTLY = 6; + */ + const FAILED_PERMANENTLY = 6; + /** + * The stream is starting, but not yet running. + * + * Generated from protobuf enum STARTING = 7; + */ + const STARTING = 7; + /** + * The Stream is no longer reading new events, but still writing events in + * the buffer. + * + * Generated from protobuf enum DRAINING = 8; + */ + const DRAINING = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::NOT_STARTED => 'NOT_STARTED', + self::RUNNING => 'RUNNING', + self::PAUSED => 'PAUSED', + self::MAINTENANCE => 'MAINTENANCE', + self::FAILED => 'FAILED', + self::FAILED_PERMANENTLY => 'FAILED_PERMANENTLY', + self::STARTING => 'STARTING', + self::DRAINING => 'DRAINING', + ]; + + 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(State::class, \Google\Cloud\Datastream\V1\Stream_State::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php new file mode 100644 index 000000000000..805c4b7f3313 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php @@ -0,0 +1,311 @@ +google.cloud.datastream.v1.StreamObject + */ +class StreamObject extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The object resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The creation time of the object. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update time of the object. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Output only. Active errors on the object. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * The latest backfill job that was initiated for the stream object. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob backfill_job = 7; + */ + protected $backfill_job = null; + /** + * The object identifier in the data source. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object = 8; + */ + protected $source_object = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The object resource's name. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the object. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update time of the object. + * @type string $display_name + * Required. Display name. + * @type array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. Active errors on the object. + * @type \Google\Cloud\Datastream\V1\BackfillJob $backfill_job + * The latest backfill job that was initiated for the stream object. + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier $source_object + * The object identifier in the data source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The object resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The object resource's name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The creation time of the object. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation time of the object. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update time of the object. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update time of the object. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Display name. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Active errors on the object. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. Active errors on the object. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Error::class); + $this->errors = $arr; + + return $this; + } + + /** + * The latest backfill job that was initiated for the stream object. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob backfill_job = 7; + * @return \Google\Cloud\Datastream\V1\BackfillJob|null + */ + public function getBackfillJob() + { + return $this->backfill_job; + } + + public function hasBackfillJob() + { + return isset($this->backfill_job); + } + + public function clearBackfillJob() + { + unset($this->backfill_job); + } + + /** + * The latest backfill job that was initiated for the stream object. + * + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob backfill_job = 7; + * @param \Google\Cloud\Datastream\V1\BackfillJob $var + * @return $this + */ + public function setBackfillJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BackfillJob::class); + $this->backfill_job = $var; + + return $this; + } + + /** + * The object identifier in the data source. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object = 8; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier|null + */ + public function getSourceObject() + { + return $this->source_object; + } + + public function hasSourceObject() + { + return isset($this->source_object); + } + + public function clearSourceObject() + { + unset($this->source_object); + } + + /** + * The object identifier in the data source. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object = 8; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier $var + * @return $this + */ + public function setSourceObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier::class); + $this->source_object = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php new file mode 100644 index 000000000000..d6e2b2bb9165 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php @@ -0,0 +1,302 @@ +google.cloud.datastream.v1.UpdateConnectionProfileRequest + */ +class UpdateConnectionProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ConnectionProfile resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The connection profile to update. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $connection_profile = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. Update the connection profile without validating it. + * + * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param \Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile Required. The connection profile to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * ConnectionProfile resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\Datastream\V1\UpdateConnectionProfileRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setConnectionProfile($connectionProfile) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * ConnectionProfile resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\Datastream\V1\ConnectionProfile $connection_profile + * Required. The connection profile to update. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. + * @type bool $force + * Optional. Update the connection profile without validating it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ConnectionProfile resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ConnectionProfile resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The connection profile to update. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\ConnectionProfile|null + */ + public function getConnectionProfile() + { + return $this->connection_profile; + } + + public function hasConnectionProfile() + { + return isset($this->connection_profile); + } + + public function clearConnectionProfile() + { + unset($this->connection_profile); + } + + /** + * Required. The connection profile to update. + * + * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\ConnectionProfile $var + * @return $this + */ + public function setConnectionProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ConnectionProfile::class); + $this->connection_profile = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the connection profile, but don't update any + * resources. The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. Update the connection profile without validating it. + * + * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. Update the connection profile without validating it. + * + * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php new file mode 100644 index 000000000000..235e805ef9b5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php @@ -0,0 +1,302 @@ +google.cloud.datastream.v1.UpdateStreamRequest + */ +class UpdateStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The stream resource to update. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Only validate the stream with the changes, without actually + * updating it. The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. Update the stream without validating it. + * + * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param \Google\Cloud\Datastream\V1\Stream $stream Required. The stream resource to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\Datastream\V1\UpdateStreamRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Datastream\V1\Stream $stream, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setStream($stream) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\Datastream\V1\Stream $stream + * Required. The stream resource to update. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $validate_only + * Optional. Only validate the stream with the changes, without actually + * updating it. The default is false. + * @type bool $force + * Optional. Update the stream without validating it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The stream resource to update. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Datastream\V1\Stream|null + */ + public function getStream() + { + return $this->stream; + } + + public function hasStream() + { + return isset($this->stream); + } + + public function clearStream() + { + unset($this->stream); + } + + /** + * Required. The stream resource to update. + * + * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Datastream\V1\Stream $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream::class); + $this->stream = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Only validate the stream with the changes, without actually + * updating it. The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. Only validate the stream with the changes, without actually + * updating it. The default is false. + * + * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. Update the stream without validating it. + * + * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. Update the stream without validating it. + * + * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php new file mode 100644 index 000000000000..886455b085ce --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php @@ -0,0 +1,169 @@ +google.cloud.datastream.v1.Validation + */ +class Validation extends \Google\Protobuf\Internal\Message +{ + /** + * A short description of the validation. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * Output only. Validation execution status. + * + * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Messages reflecting the validation results. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.ValidationMessage message = 3; + */ + private $message; + /** + * A custom code identifying this validation. + * + * Generated from protobuf field string code = 4; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * A short description of the validation. + * @type int $state + * Output only. Validation execution status. + * @type array<\Google\Cloud\Datastream\V1\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $message + * Messages reflecting the validation results. + * @type string $code + * A custom code identifying this validation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * A short description of the validation. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A short description of the validation. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Validation execution status. + * + * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Validation execution status. + * + * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\Validation\State::class); + $this->state = $var; + + return $this; + } + + /** + * Messages reflecting the validation results. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.ValidationMessage message = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessage() + { + return $this->message; + } + + /** + * Messages reflecting the validation results. + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.ValidationMessage message = 3; + * @param array<\Google\Cloud\Datastream\V1\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessage($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\ValidationMessage::class); + $this->message = $arr; + + return $this; + } + + /** + * A custom code identifying this validation. + * + * Generated from protobuf field string code = 4; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * A custom code identifying this validation. + * + * Generated from protobuf field string code = 4; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php new file mode 100644 index 000000000000..e969926775bf --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php @@ -0,0 +1,78 @@ +google.cloud.datastream.v1.Validation.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Validation did not execute. + * + * Generated from protobuf enum NOT_EXECUTED = 1; + */ + const NOT_EXECUTED = 1; + /** + * Validation failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * Validation passed. + * + * Generated from protobuf enum PASSED = 3; + */ + const PASSED = 3; + /** + * Validation executed with warnings. + * + * Generated from protobuf enum WARNING = 4; + */ + const WARNING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::NOT_EXECUTED => 'NOT_EXECUTED', + self::FAILED => 'FAILED', + self::PASSED => 'PASSED', + self::WARNING => 'WARNING', + ]; + + 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(State::class, \Google\Cloud\Datastream\V1\Validation_State::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php new file mode 100644 index 000000000000..4df97c6e6bcd --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php @@ -0,0 +1,169 @@ +google.cloud.datastream.v1.ValidationMessage + */ +class ValidationMessage extends \Google\Protobuf\Internal\Message +{ + /** + * The result of the validation. + * + * Generated from protobuf field string message = 1; + */ + protected $message = ''; + /** + * Message severity level (warning or error). + * + * Generated from protobuf field .google.cloud.datastream.v1.ValidationMessage.Level level = 2; + */ + protected $level = 0; + /** + * Additional metadata related to the result. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + /** + * A custom code identifying this specific message. + * + * Generated from protobuf field string code = 4; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $message + * The result of the validation. + * @type int $level + * Message severity level (warning or error). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Additional metadata related to the result. + * @type string $code + * A custom code identifying this specific message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * The result of the validation. + * + * Generated from protobuf field string message = 1; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The result of the validation. + * + * Generated from protobuf field string message = 1; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Message severity level (warning or error). + * + * Generated from protobuf field .google.cloud.datastream.v1.ValidationMessage.Level level = 2; + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * Message severity level (warning or error). + * + * Generated from protobuf field .google.cloud.datastream.v1.ValidationMessage.Level level = 2; + * @param int $var + * @return $this + */ + public function setLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\ValidationMessage\Level::class); + $this->level = $var; + + return $this; + } + + /** + * Additional metadata related to the result. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Additional metadata related to the result. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * A custom code identifying this specific message. + * + * Generated from protobuf field string code = 4; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * A custom code identifying this specific message. + * + * Generated from protobuf field string code = 4; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php new file mode 100644 index 000000000000..e40c2003005a --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php @@ -0,0 +1,64 @@ +google.cloud.datastream.v1.ValidationMessage.Level + */ +class Level +{ + /** + * Unspecified level. + * + * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; + */ + const LEVEL_UNSPECIFIED = 0; + /** + * Potentially cause issues with the Stream. + * + * Generated from protobuf enum WARNING = 1; + */ + const WARNING = 1; + /** + * Definitely cause issues with the Stream. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + + private static $valueToName = [ + self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + ]; + + 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(Level::class, \Google\Cloud\Datastream\V1\ValidationMessage_Level::class); + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php new file mode 100644 index 000000000000..c17ce32c88f4 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php @@ -0,0 +1,71 @@ +google.cloud.datastream.v1.ValidationResult + */ +class ValidationResult extends \Google\Protobuf\Internal\Message +{ + /** + * A list of validations (includes both executed as well as not executed + * validations). + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Validation validations = 1; + */ + private $validations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Datastream\V1\Validation>|\Google\Protobuf\Internal\RepeatedField $validations + * A list of validations (includes both executed as well as not executed + * validations). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * A list of validations (includes both executed as well as not executed + * validations). + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Validation validations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidations() + { + return $this->validations; + } + + /** + * A list of validations (includes both executed as well as not executed + * validations). + * + * Generated from protobuf field repeated .google.cloud.datastream.v1.Validation validations = 1; + * @param array<\Google\Cloud\Datastream\V1\Validation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Validation::class); + $this->validations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php new file mode 100644 index 000000000000..93986c4ac644 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php @@ -0,0 +1,106 @@ +google.cloud.datastream.v1.VpcPeeringConfig + */ +class VpcPeeringConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified name of the VPC that Datastream will peer to. + * Format: `projects/{project}/global/{networks}/{name}` + * + * Generated from protobuf field string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $vpc = ''; + /** + * Required. A free subnet for peering. (CIDR of /29) + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subnet = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vpc + * Required. Fully qualified name of the VPC that Datastream will peer to. + * Format: `projects/{project}/global/{networks}/{name}` + * @type string $subnet + * Required. A free subnet for peering. (CIDR of /29) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified name of the VPC that Datastream will peer to. + * Format: `projects/{project}/global/{networks}/{name}` + * + * Generated from protobuf field string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getVpc() + { + return $this->vpc; + } + + /** + * Required. Fully qualified name of the VPC that Datastream will peer to. + * Format: `projects/{project}/global/{networks}/{name}` + * + * Generated from protobuf field string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpc($var) + { + GPBUtil::checkString($var, True); + $this->vpc = $var; + + return $this; + } + + /** + * Required. A free subnet for peering. (CIDR of /29) + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Required. A free subnet for peering. (CIDR of /29) + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php new file mode 100644 index 000000000000..21c444d506e3 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php @@ -0,0 +1,98 @@ +setDisplayName($connectionProfileDisplayName); + $request = (new CreateConnectionProfileRequest()) + ->setParent($formattedParent) + ->setConnectionProfileId($connectionProfileId) + ->setConnectionProfile($connectionProfile); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->createConnectionProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConnectionProfile $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + $connectionProfileId = '[CONNECTION_PROFILE_ID]'; + $connectionProfileDisplayName = '[DISPLAY_NAME]'; + + create_connection_profile_sample( + $formattedParent, + $connectionProfileId, + $connectionProfileDisplayName + ); +} +// [END datastream_v1_generated_Datastream_CreateConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php new file mode 100644 index 000000000000..db8c0f65a57a --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php @@ -0,0 +1,98 @@ +setDisplayName($privateConnectionDisplayName); + $request = (new CreatePrivateConnectionRequest()) + ->setParent($formattedParent) + ->setPrivateConnectionId($privateConnectionId) + ->setPrivateConnection($privateConnection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->createPrivateConnection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PrivateConnection $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + $privateConnectionId = '[PRIVATE_CONNECTION_ID]'; + $privateConnectionDisplayName = '[DISPLAY_NAME]'; + + create_private_connection_sample( + $formattedParent, + $privateConnectionId, + $privateConnectionDisplayName + ); +} +// [END datastream_v1_generated_Datastream_CreatePrivateConnection_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php new file mode 100644 index 000000000000..9b74411b98ea --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php @@ -0,0 +1,103 @@ +setDisplayName($routeDisplayName) + ->setDestinationAddress($routeDestinationAddress); + $request = (new CreateRouteRequest()) + ->setParent($formattedParent) + ->setRouteId($routeId) + ->setRoute($route); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->createRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Route $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + $routeId = '[ROUTE_ID]'; + $routeDisplayName = '[DISPLAY_NAME]'; + $routeDestinationAddress = '[DESTINATION_ADDRESS]'; + + create_route_sample($formattedParent, $routeId, $routeDisplayName, $routeDestinationAddress); +} +// [END datastream_v1_generated_Datastream_CreateRoute_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php new file mode 100644 index 000000000000..17d2cefb9bb5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php @@ -0,0 +1,126 @@ +setSourceConnectionProfile($formattedStreamSourceConfigSourceConnectionProfile); + $streamDestinationConfig = (new DestinationConfig()) + ->setDestinationConnectionProfile($formattedStreamDestinationConfigDestinationConnectionProfile); + $stream = (new Stream()) + ->setDisplayName($streamDisplayName) + ->setSourceConfig($streamSourceConfig) + ->setDestinationConfig($streamDestinationConfig); + $request = (new CreateStreamRequest()) + ->setParent($formattedParent) + ->setStreamId($streamId) + ->setStream($stream); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->createStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Stream $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + $streamId = '[STREAM_ID]'; + $streamDisplayName = '[DISPLAY_NAME]'; + $formattedStreamSourceConfigSourceConnectionProfile = DatastreamClient::connectionProfileName( + '[PROJECT]', + '[LOCATION]', + '[CONNECTION_PROFILE]' + ); + $formattedStreamDestinationConfigDestinationConnectionProfile = DatastreamClient::connectionProfileName( + '[PROJECT]', + '[LOCATION]', + '[CONNECTION_PROFILE]' + ); + + create_stream_sample( + $formattedParent, + $streamId, + $streamDisplayName, + $formattedStreamSourceConfigSourceConnectionProfile, + $formattedStreamDestinationConfigDestinationConnectionProfile + ); +} +// [END datastream_v1_generated_Datastream_CreateStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php new file mode 100644 index 000000000000..e2f6b8b2a0a8 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->deleteConnectionProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::connectionProfileName( + '[PROJECT]', + '[LOCATION]', + '[CONNECTION_PROFILE]' + ); + + delete_connection_profile_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_DeleteConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php new file mode 100644 index 000000000000..be9173aee336 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->deletePrivateConnection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + + delete_private_connection_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_DeletePrivateConnection_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php new file mode 100644 index 000000000000..73fd0f93e154 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->deleteRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::routeName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]', + '[ROUTE]' + ); + + delete_route_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_DeleteRoute_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php new file mode 100644 index 000000000000..9ee89c2896b5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->deleteStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + + delete_stream_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_DeleteStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php new file mode 100644 index 000000000000..5fd7a5bb7a00 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var DiscoverConnectionProfileResponse $response */ + $response = $datastreamClient->discoverConnectionProfile($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 +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + + discover_connection_profile_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_DiscoverConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php new file mode 100644 index 000000000000..9c269976762f --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $datastreamClient->fetchStaticIps($request); + + /** @var string $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + + fetch_static_ips_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_FetchStaticIps_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php new file mode 100644 index 000000000000..f410a32e1bc3 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ConnectionProfile $response */ + $response = $datastreamClient->getConnectionProfile($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::connectionProfileName( + '[PROJECT]', + '[LOCATION]', + '[CONNECTION_PROFILE]' + ); + + get_connection_profile_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_GetConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php new file mode 100644 index 000000000000..3dc7fbe2e4b0 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datastream_v1_generated_Datastream_GetLocation_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php new file mode 100644 index 000000000000..16622f367b9c --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PrivateConnection $response */ + $response = $datastreamClient->getPrivateConnection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + + get_private_connection_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_GetPrivateConnection_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php new file mode 100644 index 000000000000..c4c53de13362 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Route $response */ + $response = $datastreamClient->getRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::routeName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]', + '[ROUTE]' + ); + + get_route_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_GetRoute_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php new file mode 100644 index 000000000000..e34244b81fa7 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Stream $response */ + $response = $datastreamClient->getStream($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + + get_stream_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_GetStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php new file mode 100644 index 000000000000..914124fba458 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var StreamObject $response */ + $response = $datastreamClient->getStreamObject($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::streamObjectName( + '[PROJECT]', + '[LOCATION]', + '[STREAM]', + '[OBJECT]' + ); + + get_stream_object_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_GetStreamObject_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php new file mode 100644 index 000000000000..6cc49a75ef30 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $datastreamClient->listConnectionProfiles($request); + + /** @var ConnectionProfile $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + + list_connection_profiles_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_ListConnectionProfiles_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php new file mode 100644 index 000000000000..3155f28cc6b5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END datastream_v1_generated_Datastream_ListLocations_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php new file mode 100644 index 000000000000..c66fd4a230f1 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $datastreamClient->listPrivateConnections($request); + + /** @var PrivateConnection $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + + list_private_connections_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_ListPrivateConnections_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php new file mode 100644 index 000000000000..f5d4157e6459 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $datastreamClient->listRoutes($request); + + /** @var Route $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::privateConnectionName( + '[PROJECT]', + '[LOCATION]', + '[PRIVATE_CONNECTION]' + ); + + list_routes_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_ListRoutes_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php new file mode 100644 index 000000000000..32750d183eff --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $datastreamClient->listStreamObjects($request); + + /** @var StreamObject $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + + list_stream_objects_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_ListStreamObjects_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php new file mode 100644 index 000000000000..f6d38f9c1db0 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $datastreamClient->listStreams($request); + + /** @var Stream $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); + + list_streams_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_ListStreams_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php new file mode 100644 index 000000000000..a3bf962751d0 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setSourceObjectIdentifier($sourceObjectIdentifier); + + // Call the API and handle any network failures. + try { + /** @var StreamObject $response */ + $response = $datastreamClient->lookupStreamObject($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 +{ + $formattedParent = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + + lookup_stream_object_sample($formattedParent); +} +// [END datastream_v1_generated_Datastream_LookupStreamObject_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/run_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/run_stream.php new file mode 100644 index 000000000000..f4c3e5be02b4 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/run_stream.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->runStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Stream $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + + run_stream_sample($formattedName); +} +// [END datastream_v1_generated_Datastream_RunStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php new file mode 100644 index 000000000000..0deeccf24b74 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php @@ -0,0 +1,77 @@ +setObject($formattedObject); + + // Call the API and handle any network failures. + try { + /** @var StartBackfillJobResponse $response */ + $response = $datastreamClient->startBackfillJob($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 +{ + $formattedObject = DatastreamClient::streamObjectName( + '[PROJECT]', + '[LOCATION]', + '[STREAM]', + '[OBJECT]' + ); + + start_backfill_job_sample($formattedObject); +} +// [END datastream_v1_generated_Datastream_StartBackfillJob_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php new file mode 100644 index 000000000000..2c877988f76c --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php @@ -0,0 +1,77 @@ +setObject($formattedObject); + + // Call the API and handle any network failures. + try { + /** @var StopBackfillJobResponse $response */ + $response = $datastreamClient->stopBackfillJob($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 +{ + $formattedObject = DatastreamClient::streamObjectName( + '[PROJECT]', + '[LOCATION]', + '[STREAM]', + '[OBJECT]' + ); + + stop_backfill_job_sample($formattedObject); +} +// [END datastream_v1_generated_Datastream_StopBackfillJob_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php new file mode 100644 index 000000000000..baa5c99dad93 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php @@ -0,0 +1,84 @@ +setDisplayName($connectionProfileDisplayName); + $request = (new UpdateConnectionProfileRequest()) + ->setConnectionProfile($connectionProfile); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->updateConnectionProfile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConnectionProfile $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $connectionProfileDisplayName = '[DISPLAY_NAME]'; + + update_connection_profile_sample($connectionProfileDisplayName); +} +// [END datastream_v1_generated_Datastream_UpdateConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php new file mode 100644 index 000000000000..a81b5050f31e --- /dev/null +++ b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php @@ -0,0 +1,115 @@ +setSourceConnectionProfile($formattedStreamSourceConfigSourceConnectionProfile); + $streamDestinationConfig = (new DestinationConfig()) + ->setDestinationConnectionProfile($formattedStreamDestinationConfigDestinationConnectionProfile); + $stream = (new Stream()) + ->setDisplayName($streamDisplayName) + ->setSourceConfig($streamSourceConfig) + ->setDestinationConfig($streamDestinationConfig); + $request = (new UpdateStreamRequest()) + ->setStream($stream); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $datastreamClient->updateStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Stream $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $streamDisplayName = '[DISPLAY_NAME]'; + $formattedStreamSourceConfigSourceConnectionProfile = DatastreamClient::connectionProfileName( + '[PROJECT]', + '[LOCATION]', + '[CONNECTION_PROFILE]' + ); + $formattedStreamDestinationConfigDestinationConnectionProfile = DatastreamClient::connectionProfileName( + '[PROJECT]', + '[LOCATION]', + '[CONNECTION_PROFILE]' + ); + + update_stream_sample( + $streamDisplayName, + $formattedStreamSourceConfigSourceConnectionProfile, + $formattedStreamDestinationConfigDestinationConnectionProfile + ); +} +// [END datastream_v1_generated_Datastream_UpdateStream_sync] diff --git a/owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php b/owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php new file mode 100644 index 000000000000..8b42de9733c5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php @@ -0,0 +1,1187 @@ + createConnectionProfileAsync(CreateConnectionProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPrivateConnectionAsync(CreatePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createRouteAsync(CreateRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface createStreamAsync(CreateStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConnectionProfileAsync(DeleteConnectionProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePrivateConnectionAsync(DeletePrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRouteAsync(DeleteRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteStreamAsync(DeleteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface discoverConnectionProfileAsync(DiscoverConnectionProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchStaticIpsAsync(FetchStaticIpsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectionProfileAsync(GetConnectionProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPrivateConnectionAsync(GetPrivateConnectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRouteAsync(GetRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStreamAsync(GetStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStreamObjectAsync(GetStreamObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConnectionProfilesAsync(ListConnectionProfilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrivateConnectionsAsync(ListPrivateConnectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRoutesAsync(ListRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listStreamObjectsAsync(ListStreamObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listStreamsAsync(ListStreamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface lookupStreamObjectAsync(LookupStreamObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface runStreamAsync(RunStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface startBackfillJobAsync(StartBackfillJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopBackfillJobAsync(StopBackfillJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateConnectionProfileAsync(UpdateConnectionProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateStreamAsync(UpdateStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class DatastreamClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.datastream.v1.Datastream'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'datastream.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'datastream.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/datastream_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/datastream_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/datastream_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/datastream_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * connection_profile resource. + * + * @param string $project + * @param string $location + * @param string $connectionProfile + * + * @return string The formatted connection_profile resource. + */ + public static function connectionProfileName(string $project, string $location, string $connectionProfile): string + { + return self::getPathTemplate('connectionProfile')->render([ + 'project' => $project, + 'location' => $location, + 'connection_profile' => $connectionProfile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a networks + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted networks resource. + */ + public static function networksName(string $project, string $network): string + { + return self::getPathTemplate('networks')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * private_connection resource. + * + * @param string $project + * @param string $location + * @param string $privateConnection + * + * @return string The formatted private_connection resource. + */ + public static function privateConnectionName(string $project, string $location, string $privateConnection): string + { + return self::getPathTemplate('privateConnection')->render([ + 'project' => $project, + 'location' => $location, + 'private_connection' => $privateConnection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a route + * resource. + * + * @param string $project + * @param string $location + * @param string $privateConnection + * @param string $route + * + * @return string The formatted route resource. + */ + public static function routeName(string $project, string $location, string $privateConnection, string $route): string + { + return self::getPathTemplate('route')->render([ + 'project' => $project, + 'location' => $location, + 'private_connection' => $privateConnection, + 'route' => $route, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a stream + * resource. + * + * @param string $project + * @param string $location + * @param string $stream + * + * @return string The formatted stream resource. + */ + public static function streamName(string $project, string $location, string $stream): string + { + return self::getPathTemplate('stream')->render([ + 'project' => $project, + 'location' => $location, + 'stream' => $stream, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * stream_object resource. + * + * @param string $project + * @param string $location + * @param string $stream + * @param string $object + * + * @return string The formatted stream_object resource. + */ + public static function streamObjectName(string $project, string $location, string $stream, string $object): string + { + return self::getPathTemplate('streamObject')->render([ + 'project' => $project, + 'location' => $location, + 'stream' => $stream, + 'object' => $object, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connectionProfile: projects/{project}/locations/{location}/connectionProfiles/{connection_profile} + * - location: projects/{project}/locations/{location} + * - networks: projects/{project}/global/networks/{network} + * - privateConnection: projects/{project}/locations/{location}/privateConnections/{private_connection} + * - route: projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route} + * - stream: projects/{project}/locations/{location}/streams/{stream} + * - streamObject: projects/{project}/locations/{location}/streams/{stream}/objects/{object} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $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 'datastream.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); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Use this method to create a connection profile in a project and location. + * + * The async variant is {@see DatastreamClient::createConnectionProfileAsync()} . + * + * @example samples/V1/DatastreamClient/create_connection_profile.php + * + * @param CreateConnectionProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createConnectionProfile(CreateConnectionProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateConnectionProfile', $request, $callOptions)->wait(); + } + + /** + * Use this method to create a private connectivity configuration. + * + * The async variant is {@see DatastreamClient::createPrivateConnectionAsync()} . + * + * @example samples/V1/DatastreamClient/create_private_connection.php + * + * @param CreatePrivateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPrivateConnection(CreatePrivateConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Use this method to create a route for a private connectivity configuration + * in a project and location. + * + * The async variant is {@see DatastreamClient::createRouteAsync()} . + * + * @example samples/V1/DatastreamClient/create_route.php + * + * @param CreateRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRoute(CreateRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateRoute', $request, $callOptions)->wait(); + } + + /** + * Use this method to create a stream. + * + * The async variant is {@see DatastreamClient::createStreamAsync()} . + * + * @example samples/V1/DatastreamClient/create_stream.php + * + * @param CreateStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createStream(CreateStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateStream', $request, $callOptions)->wait(); + } + + /** + * Use this method to delete a connection profile. + * + * The async variant is {@see DatastreamClient::deleteConnectionProfileAsync()} . + * + * @example samples/V1/DatastreamClient/delete_connection_profile.php + * + * @param DeleteConnectionProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteConnectionProfile(DeleteConnectionProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteConnectionProfile', $request, $callOptions)->wait(); + } + + /** + * Use this method to delete a private connectivity configuration. + * + * The async variant is {@see DatastreamClient::deletePrivateConnectionAsync()} . + * + * @example samples/V1/DatastreamClient/delete_private_connection.php + * + * @param DeletePrivateConnectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePrivateConnection(DeletePrivateConnectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Use this method to delete a route. + * + * The async variant is {@see DatastreamClient::deleteRouteAsync()} . + * + * @example samples/V1/DatastreamClient/delete_route.php + * + * @param DeleteRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteRoute(DeleteRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteRoute', $request, $callOptions)->wait(); + } + + /** + * Use this method to delete a stream. + * + * The async variant is {@see DatastreamClient::deleteStreamAsync()} . + * + * @example samples/V1/DatastreamClient/delete_stream.php + * + * @param DeleteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteStream(DeleteStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteStream', $request, $callOptions)->wait(); + } + + /** + * Use this method to discover a connection profile. + * The discover API call exposes the data objects and metadata belonging to + * the profile. Typically, a request returns children data objects of a + * parent data object that's optionally supplied in the request. + * + * The async variant is {@see DatastreamClient::discoverConnectionProfileAsync()} . + * + * @example samples/V1/DatastreamClient/discover_connection_profile.php + * + * @param DiscoverConnectionProfileRequest $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 DiscoverConnectionProfileResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function discoverConnectionProfile(DiscoverConnectionProfileRequest $request, array $callOptions = []): DiscoverConnectionProfileResponse + { + return $this->startApiCall('DiscoverConnectionProfile', $request, $callOptions)->wait(); + } + + /** + * The FetchStaticIps API call exposes the static IP addresses used by + * Datastream. + * + * The async variant is {@see DatastreamClient::fetchStaticIpsAsync()} . + * + * @example samples/V1/DatastreamClient/fetch_static_ips.php + * + * @param FetchStaticIpsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchStaticIps(FetchStaticIpsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('FetchStaticIps', $request, $callOptions); + } + + /** + * Use this method to get details about a connection profile. + * + * The async variant is {@see DatastreamClient::getConnectionProfileAsync()} . + * + * @example samples/V1/DatastreamClient/get_connection_profile.php + * + * @param GetConnectionProfileRequest $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 ConnectionProfile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnectionProfile(GetConnectionProfileRequest $request, array $callOptions = []): ConnectionProfile + { + return $this->startApiCall('GetConnectionProfile', $request, $callOptions)->wait(); + } + + /** + * Use this method to get details about a private connectivity configuration. + * + * The async variant is {@see DatastreamClient::getPrivateConnectionAsync()} . + * + * @example samples/V1/DatastreamClient/get_private_connection.php + * + * @param GetPrivateConnectionRequest $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 PrivateConnection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPrivateConnection(GetPrivateConnectionRequest $request, array $callOptions = []): PrivateConnection + { + return $this->startApiCall('GetPrivateConnection', $request, $callOptions)->wait(); + } + + /** + * Use this method to get details about a route. + * + * The async variant is {@see DatastreamClient::getRouteAsync()} . + * + * @example samples/V1/DatastreamClient/get_route.php + * + * @param GetRouteRequest $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 Route + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRoute(GetRouteRequest $request, array $callOptions = []): Route + { + return $this->startApiCall('GetRoute', $request, $callOptions)->wait(); + } + + /** + * Use this method to get details about a stream. + * + * The async variant is {@see DatastreamClient::getStreamAsync()} . + * + * @example samples/V1/DatastreamClient/get_stream.php + * + * @param GetStreamRequest $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 Stream + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStream(GetStreamRequest $request, array $callOptions = []): Stream + { + return $this->startApiCall('GetStream', $request, $callOptions)->wait(); + } + + /** + * Use this method to get details about a stream object. + * + * The async variant is {@see DatastreamClient::getStreamObjectAsync()} . + * + * @example samples/V1/DatastreamClient/get_stream_object.php + * + * @param GetStreamObjectRequest $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 StreamObject + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStreamObject(GetStreamObjectRequest $request, array $callOptions = []): StreamObject + { + return $this->startApiCall('GetStreamObject', $request, $callOptions)->wait(); + } + + /** + * Use this method to list connection profiles created in a project and + * location. + * + * The async variant is {@see DatastreamClient::listConnectionProfilesAsync()} . + * + * @example samples/V1/DatastreamClient/list_connection_profiles.php + * + * @param ListConnectionProfilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listConnectionProfiles(ListConnectionProfilesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConnectionProfiles', $request, $callOptions); + } + + /** + * Use this method to list private connectivity configurations in a project + * and location. + * + * The async variant is {@see DatastreamClient::listPrivateConnectionsAsync()} . + * + * @example samples/V1/DatastreamClient/list_private_connections.php + * + * @param ListPrivateConnectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPrivateConnections(ListPrivateConnectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPrivateConnections', $request, $callOptions); + } + + /** + * Use this method to list routes created for a private connectivity + * configuration in a project and location. + * + * The async variant is {@see DatastreamClient::listRoutesAsync()} . + * + * @example samples/V1/DatastreamClient/list_routes.php + * + * @param ListRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRoutes(ListRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRoutes', $request, $callOptions); + } + + /** + * Use this method to list the objects of a specific stream. + * + * The async variant is {@see DatastreamClient::listStreamObjectsAsync()} . + * + * @example samples/V1/DatastreamClient/list_stream_objects.php + * + * @param ListStreamObjectsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listStreamObjects(ListStreamObjectsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListStreamObjects', $request, $callOptions); + } + + /** + * Use this method to list streams in a project and location. + * + * The async variant is {@see DatastreamClient::listStreamsAsync()} . + * + * @example samples/V1/DatastreamClient/list_streams.php + * + * @param ListStreamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listStreams(ListStreamsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListStreams', $request, $callOptions); + } + + /** + * Use this method to look up a stream object by its source object identifier. + * + * The async variant is {@see DatastreamClient::lookupStreamObjectAsync()} . + * + * @example samples/V1/DatastreamClient/lookup_stream_object.php + * + * @param LookupStreamObjectRequest $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 StreamObject + * + * @throws ApiException Thrown if the API call fails. + */ + public function lookupStreamObject(LookupStreamObjectRequest $request, array $callOptions = []): StreamObject + { + return $this->startApiCall('LookupStreamObject', $request, $callOptions)->wait(); + } + + /** + * Use this method to start, resume or recover a stream with a non default CDC + * strategy. + * + * The async variant is {@see DatastreamClient::runStreamAsync()} . + * + * @example samples/V1/DatastreamClient/run_stream.php + * + * @param RunStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runStream(RunStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunStream', $request, $callOptions)->wait(); + } + + /** + * Use this method to start a backfill job for the specified stream object. + * + * The async variant is {@see DatastreamClient::startBackfillJobAsync()} . + * + * @example samples/V1/DatastreamClient/start_backfill_job.php + * + * @param StartBackfillJobRequest $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 StartBackfillJobResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startBackfillJob(StartBackfillJobRequest $request, array $callOptions = []): StartBackfillJobResponse + { + return $this->startApiCall('StartBackfillJob', $request, $callOptions)->wait(); + } + + /** + * Use this method to stop a backfill job for the specified stream object. + * + * The async variant is {@see DatastreamClient::stopBackfillJobAsync()} . + * + * @example samples/V1/DatastreamClient/stop_backfill_job.php + * + * @param StopBackfillJobRequest $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 StopBackfillJobResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopBackfillJob(StopBackfillJobRequest $request, array $callOptions = []): StopBackfillJobResponse + { + return $this->startApiCall('StopBackfillJob', $request, $callOptions)->wait(); + } + + /** + * Use this method to update the parameters of a connection profile. + * + * The async variant is {@see DatastreamClient::updateConnectionProfileAsync()} . + * + * @example samples/V1/DatastreamClient/update_connection_profile.php + * + * @param UpdateConnectionProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateConnectionProfile(UpdateConnectionProfileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateConnectionProfile', $request, $callOptions)->wait(); + } + + /** + * Use this method to update the configuration of a stream. + * + * The async variant is {@see DatastreamClient::updateStreamAsync()} . + * + * @example samples/V1/DatastreamClient/update_stream.php + * + * @param UpdateStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateStream(UpdateStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateStream', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DatastreamClient::getLocationAsync()} . + * + * @example samples/V1/DatastreamClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DatastreamClient::listLocationsAsync()} . + * + * @example samples/V1/DatastreamClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..3246246ddfcc --- /dev/null +++ b/owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json @@ -0,0 +1,158 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.datastream.v1", + "libraryPackage": "Google\\Cloud\\Datastream\\V1", + "services": { + "Datastream": { + "clients": { + "grpc": { + "libraryClient": "DatastreamGapicClient", + "rpcs": { + "CreateConnectionProfile": { + "methods": [ + "createConnectionProfile" + ] + }, + "CreatePrivateConnection": { + "methods": [ + "createPrivateConnection" + ] + }, + "CreateRoute": { + "methods": [ + "createRoute" + ] + }, + "CreateStream": { + "methods": [ + "createStream" + ] + }, + "DeleteConnectionProfile": { + "methods": [ + "deleteConnectionProfile" + ] + }, + "DeletePrivateConnection": { + "methods": [ + "deletePrivateConnection" + ] + }, + "DeleteRoute": { + "methods": [ + "deleteRoute" + ] + }, + "DeleteStream": { + "methods": [ + "deleteStream" + ] + }, + "DiscoverConnectionProfile": { + "methods": [ + "discoverConnectionProfile" + ] + }, + "FetchStaticIps": { + "methods": [ + "fetchStaticIps" + ] + }, + "GetConnectionProfile": { + "methods": [ + "getConnectionProfile" + ] + }, + "GetPrivateConnection": { + "methods": [ + "getPrivateConnection" + ] + }, + "GetRoute": { + "methods": [ + "getRoute" + ] + }, + "GetStream": { + "methods": [ + "getStream" + ] + }, + "GetStreamObject": { + "methods": [ + "getStreamObject" + ] + }, + "ListConnectionProfiles": { + "methods": [ + "listConnectionProfiles" + ] + }, + "ListPrivateConnections": { + "methods": [ + "listPrivateConnections" + ] + }, + "ListRoutes": { + "methods": [ + "listRoutes" + ] + }, + "ListStreamObjects": { + "methods": [ + "listStreamObjects" + ] + }, + "ListStreams": { + "methods": [ + "listStreams" + ] + }, + "LookupStreamObject": { + "methods": [ + "lookupStreamObject" + ] + }, + "RunStream": { + "methods": [ + "runStream" + ] + }, + "StartBackfillJob": { + "methods": [ + "startBackfillJob" + ] + }, + "StopBackfillJob": { + "methods": [ + "stopBackfillJob" + ] + }, + "UpdateConnectionProfile": { + "methods": [ + "updateConnectionProfile" + ] + }, + "UpdateStream": { + "methods": [ + "updateStream" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json new file mode 100644 index 000000000000..78c6b53a17dd --- /dev/null +++ b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json @@ -0,0 +1,184 @@ +{ + "interfaces": { + "google.cloud.datastream.v1.Datastream": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateConnectionProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreatePrivateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteConnectionProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeletePrivateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DiscoverConnectionProfile": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "FetchStaticIps": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConnectionProfile": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPrivateConnection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRoute": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStream": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStreamObject": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConnectionProfiles": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPrivateConnections": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListStreamObjects": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListStreams": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "LookupStreamObject": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RunStream": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StartBackfillJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StopBackfillJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateConnectionProfile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php new file mode 100644 index 000000000000..8188d319e7f5 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php @@ -0,0 +1,510 @@ + [ + 'google.cloud.datastream.v1.Datastream' => [ + 'CreateConnectionProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\ConnectionProfile', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePrivateConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\PrivateConnection', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\Route', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConnectionProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateConnection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RunStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateConnectionProfile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\ConnectionProfile', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'connection_profile.name', + 'fieldAccessors' => [ + 'getConnectionProfile', + 'getName', + ], + ], + ], + ], + 'UpdateStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'stream.name', + 'fieldAccessors' => [ + 'getStream', + 'getName', + ], + ], + ], + ], + 'DiscoverConnectionProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\DiscoverConnectionProfileResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'FetchStaticIps' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getStaticIps', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\FetchStaticIpsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConnectionProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\ConnectionProfile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateConnection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\PrivateConnection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\Route', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\Stream', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStreamObject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\StreamObject', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectionProfiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConnectionProfiles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\ListConnectionProfilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateConnections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPrivateConnections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\ListPrivateConnectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\ListRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListStreamObjects' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getStreamObjects', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\ListStreamObjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListStreams' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getStreams', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\ListStreamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'LookupStreamObject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\StreamObject', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'StartBackfillJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\StartBackfillJobResponse', + 'headerParams' => [ + [ + 'keyName' => 'object', + 'fieldAccessors' => [ + 'getObject', + ], + ], + ], + ], + 'StopBackfillJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Datastream\V1\StopBackfillJobResponse', + 'headerParams' => [ + [ + 'keyName' => 'object', + 'fieldAccessors' => [ + 'getObject', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'connectionProfile' => 'projects/{project}/locations/{location}/connectionProfiles/{connection_profile}', + 'location' => 'projects/{project}/locations/{location}', + 'networks' => 'projects/{project}/global/networks/{network}', + 'privateConnection' => 'projects/{project}/locations/{location}/privateConnections/{private_connection}', + 'route' => 'projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}', + 'stream' => 'projects/{project}/locations/{location}/streams/{stream}', + 'streamObject' => 'projects/{project}/locations/{location}/streams/{stream}/objects/{object}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php new file mode 100644 index 000000000000..9ee59f665e01 --- /dev/null +++ b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php @@ -0,0 +1,411 @@ + [ + 'google.cloud.datastream.v1.Datastream' => [ + 'CreateConnectionProfile' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectionProfiles', + 'body' => 'connection_profile', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'connection_profile_id', + ], + ], + 'CreatePrivateConnection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', + 'body' => 'private_connection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'private_connection_id', + ], + ], + 'CreateRoute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateConnections/*}/routes', + 'body' => 'route', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'route_id', + ], + ], + 'CreateStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/streams', + 'body' => 'stream', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'stream_id', + ], + ], + 'DeleteConnectionProfile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectionProfiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePrivateConnection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRoute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStream' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiscoverConnectionProfile' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectionProfiles:discover', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'FetchStaticIps' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}:fetchStaticIps', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConnectionProfile' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectionProfiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPrivateConnection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetStream' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetStreamObject' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*/objects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectionProfiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectionProfiles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrivateConnections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateConnections/*}/routes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListStreamObjects' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/streams/*}/objects', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListStreams' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/streams', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'LookupStreamObject' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/streams/*}/objects:lookup', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StartBackfillJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob', + 'body' => '*', + 'placeholders' => [ + 'object' => [ + 'getters' => [ + 'getObject', + ], + ], + ], + ], + 'StopBackfillJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob', + 'body' => '*', + 'placeholders' => [ + 'object' => [ + 'getters' => [ + 'getObject', + ], + ], + ], + ], + 'UpdateConnectionProfile' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}', + 'body' => 'connection_profile', + 'placeholders' => [ + 'connection_profile.name' => [ + 'getters' => [ + 'getConnectionProfile', + 'getName', + ], + ], + ], + ], + 'UpdateStream' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{stream.name=projects/*/locations/*/streams/*}', + 'body' => 'stream', + 'placeholders' => [ + 'stream.name' => [ + 'getters' => [ + 'getStream', + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php b/owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php new file mode 100644 index 000000000000..7c9346b9bc7c --- /dev/null +++ b/owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php @@ -0,0 +1,2817 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DatastreamClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DatastreamClient($options); + } + + /** @test */ + public function createConnectionProfileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ConnectionProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectionProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectionProfileId = 'connectionProfileId1179884402'; + $connectionProfile = new ConnectionProfile(); + $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; + $connectionProfile->setDisplayName($connectionProfileDisplayName); + $request = (new CreateConnectionProfileRequest()) + ->setParent($formattedParent) + ->setConnectionProfileId($connectionProfileId) + ->setConnectionProfile($connectionProfile); + $response = $gapicClient->createConnectionProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateConnectionProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectionProfileId(); + $this->assertProtobufEquals($connectionProfileId, $actualValue); + $actualValue = $actualApiRequestObject->getConnectionProfile(); + $this->assertProtobufEquals($connectionProfile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectionProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createConnectionProfileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectionProfileId = 'connectionProfileId1179884402'; + $connectionProfile = new ConnectionProfile(); + $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; + $connectionProfile->setDisplayName($connectionProfileDisplayName); + $request = (new CreateConnectionProfileRequest()) + ->setParent($formattedParent) + ->setConnectionProfileId($connectionProfileId) + ->setConnectionProfile($connectionProfile); + $response = $gapicClient->createConnectionProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectionProfileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPrivateConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new PrivateConnection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPrivateConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateConnectionId = 'privateConnectionId-1948601248'; + $privateConnection = new PrivateConnection(); + $privateConnectionDisplayName = 'privateConnectionDisplayName1030451948'; + $privateConnection->setDisplayName($privateConnectionDisplayName); + $request = (new CreatePrivateConnectionRequest()) + ->setParent($formattedParent) + ->setPrivateConnectionId($privateConnectionId) + ->setPrivateConnection($privateConnection); + $response = $gapicClient->createPrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/CreatePrivateConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateConnectionId(); + $this->assertProtobufEquals($privateConnectionId, $actualValue); + $actualValue = $actualApiRequestObject->getPrivateConnection(); + $this->assertProtobufEquals($privateConnection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPrivateConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $privateConnectionId = 'privateConnectionId-1948601248'; + $privateConnection = new PrivateConnection(); + $privateConnectionDisplayName = 'privateConnectionDisplayName1030451948'; + $privateConnection->setDisplayName($privateConnectionDisplayName); + $request = (new CreatePrivateConnectionRequest()) + ->setParent($formattedParent) + ->setPrivateConnectionId($privateConnectionId) + ->setPrivateConnection($privateConnection); + $response = $gapicClient->createPrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $destinationAddress = 'destinationAddress371693763'; + $destinationPort = 1205298706; + $expectedResponse = new Route(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDestinationAddress($destinationAddress); + $expectedResponse->setDestinationPort($destinationPort); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $routeId = 'routeId5418705'; + $route = new Route(); + $routeDisplayName = 'routeDisplayName-1988119452'; + $route->setDisplayName($routeDisplayName); + $routeDestinationAddress = 'routeDestinationAddress248623663'; + $route->setDestinationAddress($routeDestinationAddress); + $request = (new CreateRouteRequest()) + ->setParent($formattedParent) + ->setRouteId($routeId) + ->setRoute($route); + $response = $gapicClient->createRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRouteId(); + $this->assertProtobufEquals($routeId, $actualValue); + $actualValue = $actualApiRequestObject->getRoute(); + $this->assertProtobufEquals($route, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $routeId = 'routeId5418705'; + $route = new Route(); + $routeDisplayName = 'routeDisplayName-1988119452'; + $route->setDisplayName($routeDisplayName); + $routeDestinationAddress = 'routeDestinationAddress248623663'; + $route->setDestinationAddress($routeDestinationAddress); + $request = (new CreateRouteRequest()) + ->setParent($formattedParent) + ->setRouteId($routeId) + ->setRoute($route); + $response = $gapicClient->createRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createStreamTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $streamId = 'streamId-315624902'; + $stream = new Stream(); + $streamDisplayName = 'streamDisplayName41647821'; + $stream->setDisplayName($streamDisplayName); + $streamSourceConfig = new SourceConfig(); + $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); + $stream->setSourceConfig($streamSourceConfig); + $streamDestinationConfig = new DestinationConfig(); + $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); + $stream->setDestinationConfig($streamDestinationConfig); + $request = (new CreateStreamRequest()) + ->setParent($formattedParent) + ->setStreamId($streamId) + ->setStream($stream); + $response = $gapicClient->createStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getStreamId(); + $this->assertProtobufEquals($streamId, $actualValue); + $actualValue = $actualApiRequestObject->getStream(); + $this->assertProtobufEquals($stream, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStreamTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createStreamExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $streamId = 'streamId-315624902'; + $stream = new Stream(); + $streamDisplayName = 'streamDisplayName41647821'; + $stream->setDisplayName($streamDisplayName); + $streamSourceConfig = new SourceConfig(); + $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); + $stream->setSourceConfig($streamSourceConfig); + $streamDestinationConfig = new DestinationConfig(); + $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); + $stream->setDestinationConfig($streamDestinationConfig); + $request = (new CreateStreamRequest()) + ->setParent($formattedParent) + ->setStreamId($streamId) + ->setStream($stream); + $response = $gapicClient->createStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStreamTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectionProfileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConnectionProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $request = (new DeleteConnectionProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnectionProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/DeleteConnectionProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectionProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectionProfileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $request = (new DeleteConnectionProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnectionProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectionProfileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePrivateConnectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePrivateConnectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new DeletePrivateConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/DeletePrivateConnection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePrivateConnectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePrivateConnectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new DeletePrivateConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePrivateConnection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); + $request = (new DeleteRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/DeleteRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); + $request = (new DeleteRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteStreamTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new DeleteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/DeleteStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteStreamExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new DeleteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function discoverConnectionProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DiscoverConnectionProfileResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new DiscoverConnectionProfileRequest()) + ->setParent($formattedParent); + $response = $gapicClient->discoverConnectionProfile($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.datastream.v1.Datastream/DiscoverConnectionProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function discoverConnectionProfileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new DiscoverConnectionProfileRequest()) + ->setParent($formattedParent); + try { + $gapicClient->discoverConnectionProfile($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 fetchStaticIpsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $staticIpsElement = 'staticIpsElement2078370200'; + $staticIps = [ + $staticIpsElement, + ]; + $expectedResponse = new FetchStaticIpsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setStaticIps($staticIps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new FetchStaticIpsRequest()) + ->setName($formattedName); + $response = $gapicClient->fetchStaticIps($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getStaticIps()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/FetchStaticIps', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchStaticIpsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new FetchStaticIpsRequest()) + ->setName($formattedName); + try { + $gapicClient->fetchStaticIps($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 getConnectionProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ConnectionProfile(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $request = (new GetConnectionProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->getConnectionProfile($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.datastream.v1.Datastream/GetConnectionProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectionProfileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $request = (new GetConnectionProfileRequest()) + ->setName($formattedName); + try { + $gapicClient->getConnectionProfile($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 getPrivateConnectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new PrivateConnection(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new GetPrivateConnectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getPrivateConnection($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.datastream.v1.Datastream/GetPrivateConnection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPrivateConnectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new GetPrivateConnectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getPrivateConnection($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 getRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $destinationAddress = 'destinationAddress371693763'; + $destinationPort = 1205298706; + $expectedResponse = new Route(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDestinationAddress($destinationAddress); + $expectedResponse->setDestinationPort($destinationPort); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); + $request = (new GetRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getRoute($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.datastream.v1.Datastream/GetRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); + $request = (new GetRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getRoute($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 getStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new GetStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->getStream($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.datastream.v1.Datastream/GetStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new GetStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->getStream($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 getStreamObjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new StreamObject(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); + $request = (new GetStreamObjectRequest()) + ->setName($formattedName); + $response = $gapicClient->getStreamObject($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.datastream.v1.Datastream/GetStreamObject', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStreamObjectExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); + $request = (new GetStreamObjectRequest()) + ->setName($formattedName); + try { + $gapicClient->getStreamObject($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 listConnectionProfilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $connectionProfilesElement = new ConnectionProfile(); + $connectionProfiles = [ + $connectionProfilesElement, + ]; + $expectedResponse = new ListConnectionProfilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConnectionProfiles($connectionProfiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConnectionProfilesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConnectionProfiles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConnectionProfiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/ListConnectionProfiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectionProfilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListConnectionProfilesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConnectionProfiles($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 listPrivateConnectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $privateConnectionsElement = new PrivateConnection(); + $privateConnections = [ + $privateConnectionsElement, + ]; + $expectedResponse = new ListPrivateConnectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPrivateConnections($privateConnections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrivateConnectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPrivateConnections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPrivateConnections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/ListPrivateConnections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrivateConnectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrivateConnectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPrivateConnections($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 listRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $routesElement = new Route(); + $routes = [ + $routesElement, + ]; + $expectedResponse = new ListRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRoutes($routes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new ListRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/ListRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); + $request = (new ListRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRoutes($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 listStreamObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $streamObjectsElement = new StreamObject(); + $streamObjects = [ + $streamObjectsElement, + ]; + $expectedResponse = new ListStreamObjectsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setStreamObjects($streamObjects); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new ListStreamObjectsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listStreamObjects($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getStreamObjects()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/ListStreamObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStreamObjectsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new ListStreamObjectsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listStreamObjects($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 listStreamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $streamsElement = new Stream(); + $streams = [ + $streamsElement, + ]; + $expectedResponse = new ListStreamsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setStreams($streams); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListStreamsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listStreams($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getStreams()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/ListStreams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStreamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListStreamsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listStreams($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 lookupStreamObjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new StreamObject(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $sourceObjectIdentifier = new SourceObjectIdentifier(); + $request = (new LookupStreamObjectRequest()) + ->setParent($formattedParent) + ->setSourceObjectIdentifier($sourceObjectIdentifier); + $response = $gapicClient->lookupStreamObject($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.datastream.v1.Datastream/LookupStreamObject', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSourceObjectIdentifier(); + $this->assertProtobufEquals($sourceObjectIdentifier, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function lookupStreamObjectExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $sourceObjectIdentifier = new SourceObjectIdentifier(); + $request = (new LookupStreamObjectRequest()) + ->setParent($formattedParent) + ->setSourceObjectIdentifier($sourceObjectIdentifier); + try { + $gapicClient->lookupStreamObject($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 runStreamTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new RunStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->runStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/RunStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runStreamTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runStreamExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new RunStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->runStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runStreamTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startBackfillJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StartBackfillJobResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); + $request = (new StartBackfillJobRequest()) + ->setObject($formattedObject); + $response = $gapicClient->startBackfillJob($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.datastream.v1.Datastream/StartBackfillJob', $actualFuncCall); + $actualValue = $actualRequestObject->getObject(); + $this->assertProtobufEquals($formattedObject, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startBackfillJobExceptionTest() + { + $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 + $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); + $request = (new StartBackfillJobRequest()) + ->setObject($formattedObject); + try { + $gapicClient->startBackfillJob($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 stopBackfillJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StopBackfillJobResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); + $request = (new StopBackfillJobRequest()) + ->setObject($formattedObject); + $response = $gapicClient->stopBackfillJob($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.datastream.v1.Datastream/StopBackfillJob', $actualFuncCall); + $actualValue = $actualRequestObject->getObject(); + $this->assertProtobufEquals($formattedObject, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopBackfillJobExceptionTest() + { + $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 + $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); + $request = (new StopBackfillJobRequest()) + ->setObject($formattedObject); + try { + $gapicClient->stopBackfillJob($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 updateConnectionProfileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ConnectionProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateConnectionProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $connectionProfile = new ConnectionProfile(); + $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; + $connectionProfile->setDisplayName($connectionProfileDisplayName); + $request = (new UpdateConnectionProfileRequest()) + ->setConnectionProfile($connectionProfile); + $response = $gapicClient->updateConnectionProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/UpdateConnectionProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getConnectionProfile(); + $this->assertProtobufEquals($connectionProfile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateConnectionProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateConnectionProfileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $connectionProfile = new ConnectionProfile(); + $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; + $connectionProfile->setDisplayName($connectionProfileDisplayName); + $request = (new UpdateConnectionProfileRequest()) + ->setConnectionProfile($connectionProfile); + $response = $gapicClient->updateConnectionProfile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateConnectionProfileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateStreamTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $stream = new Stream(); + $streamDisplayName = 'streamDisplayName41647821'; + $stream->setDisplayName($streamDisplayName); + $streamSourceConfig = new SourceConfig(); + $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); + $stream->setSourceConfig($streamSourceConfig); + $streamDestinationConfig = new DestinationConfig(); + $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); + $stream->setDestinationConfig($streamDestinationConfig); + $request = (new UpdateStreamRequest()) + ->setStream($stream); + $response = $gapicClient->updateStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/UpdateStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getStream(); + $this->assertProtobufEquals($stream, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStreamTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateStreamExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $stream = new Stream(); + $streamDisplayName = 'streamDisplayName41647821'; + $stream->setDisplayName($streamDisplayName); + $streamSourceConfig = new SourceConfig(); + $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); + $stream->setSourceConfig($streamSourceConfig); + $streamDestinationConfig = new DestinationConfig(); + $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); + $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); + $stream->setDestinationConfig($streamDestinationConfig); + $request = (new UpdateStreamRequest()) + ->setStream($stream); + $response = $gapicClient->updateStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStreamTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConnectionProfileAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectionProfileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ConnectionProfile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectionProfileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $connectionProfileId = 'connectionProfileId1179884402'; + $connectionProfile = new ConnectionProfile(); + $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; + $connectionProfile->setDisplayName($connectionProfileDisplayName); + $request = (new CreateConnectionProfileRequest()) + ->setParent($formattedParent) + ->setConnectionProfileId($connectionProfileId) + ->setConnectionProfile($connectionProfile); + $response = $gapicClient->createConnectionProfileAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateConnectionProfile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getConnectionProfileId(); + $this->assertProtobufEquals($connectionProfileId, $actualValue); + $actualValue = $actualApiRequestObject->getConnectionProfile(); + $this->assertProtobufEquals($connectionProfile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectionProfileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 692fa3c5fa577aaab73a1cafa141fc8977bff9dc Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 21 Nov 2024 14:04:00 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- Datastream/metadata/V1/Datastream.php | Bin 12807 -> 13298 bytes .../metadata/V1/DatastreamResources.php | Bin 12999 -> 17073 bytes .../V1/DatastreamClient/run_stream.php | 0 Datastream/src/V1/BackfillJob.php | 14 +- .../src/V1/BigQueryDestinationConfig.php | 75 + .../BigQueryDestinationConfig/AppendOnly.php | 2 - .../V1/BigQueryDestinationConfig/Merge.php | 2 - .../SingleTargetDataset.php | 8 + .../src}/V1/CdcStrategy.php | 0 .../CdcStrategy/MostRecentStartPosition.php | 2 - .../NextAvailableStartPosition.php | 2 - .../V1/CdcStrategy/SpecificStartPosition.php | 2 - Datastream/src/V1/Client/DatastreamClient.php | 29 + Datastream/src/V1/ConnectionProfile.php | 33 + .../V1/DiscoverConnectionProfileRequest.php | 33 + .../V1/DiscoverConnectionProfileResponse.php | 33 + .../src}/V1/MysqlLogPosition.php | 0 Datastream/src/V1/MysqlProfile.php | 19 +- Datastream/src/V1/MysqlSourceConfig.php | 75 + .../MysqlSourceConfig/BinaryLogPosition.php | 2 - .../src}/V1/MysqlSourceConfig/Gtid.php | 2 - Datastream/src/V1/OperationMetadata.php | 28 +- .../src}/V1/OracleAsmConfig.php | 0 Datastream/src/V1/OracleProfile.php | 145 +- .../src}/V1/OracleScnPosition.php | 0 Datastream/src/V1/OracleSourceConfig.php | 81 +- .../V1/OracleSourceConfig/BinaryLogParser.php | 2 - .../BinaryLogParser/LogFileDirectories.php | 2 - .../OracleAsmLogFileAccess.php | 2 - .../src}/V1/OracleSourceConfig/LogMiner.php | 2 - .../src}/V1/OracleSslConfig.php | 0 Datastream/src/V1/PostgresqlProfile.php | 18 +- .../src}/V1/RunStreamRequest.php | 0 Datastream/src/V1/SourceConfig.php | 33 + Datastream/src/V1/SourceObjectIdentifier.php | 33 + .../SqlServerObjectIdentifier.php | 2 - .../src}/V1/SqlServerChangeTables.php | 0 .../src}/V1/SqlServerColumn.php | 0 .../src}/V1/SqlServerLsnPosition.php | 0 .../src}/V1/SqlServerProfile.php | 0 .../src}/V1/SqlServerRdbms.php | 0 .../src}/V1/SqlServerSchema.php | 0 .../src}/V1/SqlServerSourceConfig.php | 0 .../src}/V1/SqlServerTable.php | 0 .../src}/V1/SqlServerTransactionLogs.php | 0 Datastream/src/V1/Stream.php | 48 + .../src/V1/Stream/BackfillAllStrategy.php | 33 + Datastream/src/V1/Validation.php | 14 +- Datastream/src/V1/Validation/State.php | 7 + Datastream/src/V1/gapic_metadata.json | 5 + .../resources/datastream_client_config.json | 5 + .../datastream_descriptor_config.php | 19 + .../datastream_rest_client_config.php | 12 + .../Unit/V1/Client/DatastreamClientTest.php | 129 + .../Google/Cloud/Datastream/V1/Datastream.php | Bin 13298 -> 0 bytes .../Datastream/V1/DatastreamResources.php | Bin 17073 -> 0 bytes .../Cloud/Datastream/V1/AvroFileFormat.php | 33 - .../Cloud/Datastream/V1/BackfillJob.php | 223 -- .../Cloud/Datastream/V1/BackfillJob/State.php | 102 - .../Datastream/V1/BackfillJob/Trigger.php | 65 - .../V1/BigQueryDestinationConfig.php | 239 -- .../SingleTargetDataset.php | 78 - .../SourceHierarchyDatasets.php | 81 - .../DatasetTemplate.php | 178 -- .../Cloud/Datastream/V1/BigQueryProfile.php | 33 - .../Cloud/Datastream/V1/ConnectionProfile.php | 539 ---- .../V1/CreateConnectionProfileRequest.php | 309 -- .../V1/CreatePrivateConnectionRequest.php | 271 -- .../Datastream/V1/CreateRouteRequest.php | 237 -- .../Datastream/V1/CreateStreamRequest.php | 309 -- .../V1/DeleteConnectionProfileRequest.php | 155 - .../V1/DeletePrivateConnectionRequest.php | 193 -- .../Datastream/V1/DeleteRouteRequest.php | 155 - .../Datastream/V1/DeleteStreamRequest.php | 155 - .../Cloud/Datastream/V1/DestinationConfig.php | 146 - .../V1/DiscoverConnectionProfileRequest.php | 365 --- .../V1/DiscoverConnectionProfileResponse.php | 174 - .../src/Google/Cloud/Datastream/V1/Error.php | 217 -- .../Datastream/V1/FetchStaticIpsRequest.php | 158 - .../Datastream/V1/FetchStaticIpsResponse.php | 105 - .../V1/ForwardSshTunnelConnectivity.php | 210 -- .../Datastream/V1/GcsDestinationConfig.php | 228 -- .../Google/Cloud/Datastream/V1/GcsProfile.php | 101 - .../V1/GetConnectionProfileRequest.php | 81 - .../V1/GetPrivateConnectionRequest.php | 81 - .../Cloud/Datastream/V1/GetRouteRequest.php | 81 - .../Datastream/V1/GetStreamObjectRequest.php | 81 - .../Cloud/Datastream/V1/GetStreamRequest.php | 81 - .../Cloud/Datastream/V1/JsonFileFormat.php | 101 - .../V1/JsonFileFormat/JsonCompression.php | 64 - .../V1/JsonFileFormat/SchemaFileFormat.php | 64 - .../V1/ListConnectionProfilesRequest.php | 237 -- .../V1/ListConnectionProfilesResponse.php | 139 - .../V1/ListPrivateConnectionsRequest.php | 250 -- .../V1/ListPrivateConnectionsResponse.php | 139 - .../Cloud/Datastream/V1/ListRoutesRequest.php | 245 -- .../Datastream/V1/ListRoutesResponse.php | 139 - .../V1/ListStreamObjectsRequest.php | 169 - .../V1/ListStreamObjectsResponse.php | 101 - .../Datastream/V1/ListStreamsRequest.php | 237 -- .../Datastream/V1/ListStreamsResponse.php | 139 - .../V1/LookupStreamObjectRequest.php | 112 - .../Cloud/Datastream/V1/MysqlColumn.php | 343 -- .../Cloud/Datastream/V1/MysqlDatabase.php | 101 - .../Cloud/Datastream/V1/MysqlProfile.php | 218 -- .../Google/Cloud/Datastream/V1/MysqlRdbms.php | 67 - .../Cloud/Datastream/V1/MysqlSourceConfig.php | 276 -- .../Cloud/Datastream/V1/MysqlSslConfig.php | 257 -- .../Google/Cloud/Datastream/V1/MysqlTable.php | 109 - .../Cloud/Datastream/V1/OperationMetadata.php | 355 --- .../Cloud/Datastream/V1/OracleColumn.php | 339 -- .../Cloud/Datastream/V1/OracleProfile.php | 368 --- .../Cloud/Datastream/V1/OracleRdbms.php | 67 - .../Cloud/Datastream/V1/OracleSchema.php | 101 - .../Datastream/V1/OracleSourceConfig.php | 347 -- .../OracleSourceConfig/DropLargeObjects.php | 36 - .../OracleSourceConfig/StreamLargeObjects.php | 36 - .../Cloud/Datastream/V1/OracleTable.php | 109 - .../Cloud/Datastream/V1/PostgresqlColumn.php | 305 -- .../Cloud/Datastream/V1/PostgresqlProfile.php | 207 -- .../Cloud/Datastream/V1/PostgresqlRdbms.php | 67 - .../Cloud/Datastream/V1/PostgresqlSchema.php | 101 - .../Datastream/V1/PostgresqlSourceConfig.php | 239 -- .../Cloud/Datastream/V1/PostgresqlTable.php | 109 - .../Cloud/Datastream/V1/PrivateConnection.php | 350 -- .../Datastream/V1/PrivateConnection/State.php | 85 - .../Datastream/V1/PrivateConnectivity.php | 71 - .../src/Google/Cloud/Datastream/V1/Route.php | 292 -- .../Cloud/Datastream/V1/SourceConfig.php | 212 -- .../Datastream/V1/SourceObjectIdentifier.php | 174 - .../MysqlObjectIdentifier.php | 104 - .../OracleObjectIdentifier.php | 104 - .../PostgresqlObjectIdentifier.php | 104 - .../Datastream/V1/StartBackfillJobRequest.php | 86 - .../V1/StartBackfillJobResponse.php | 77 - .../V1/StaticServiceIpConnectivity.php | 35 - .../Datastream/V1/StopBackfillJobRequest.php | 87 - .../Datastream/V1/StopBackfillJobResponse.php | 77 - .../src/Google/Cloud/Datastream/V1/Stream.php | 561 ---- .../V1/Stream/BackfillAllStrategy.php | 178 -- .../V1/Stream/BackfillNoneStrategy.php | 36 - .../Cloud/Datastream/V1/Stream/State.php | 109 - .../Cloud/Datastream/V1/StreamObject.php | 311 -- .../V1/UpdateConnectionProfileRequest.php | 302 -- .../Datastream/V1/UpdateStreamRequest.php | 302 -- .../Google/Cloud/Datastream/V1/Validation.php | 169 - .../Cloud/Datastream/V1/Validation/State.php | 78 - .../Cloud/Datastream/V1/ValidationMessage.php | 169 - .../Datastream/V1/ValidationMessage/Level.php | 64 - .../Cloud/Datastream/V1/ValidationResult.php | 71 - .../Cloud/Datastream/V1/VpcPeeringConfig.php | 106 - .../create_connection_profile.php | 98 - .../create_private_connection.php | 98 - .../V1/DatastreamClient/create_route.php | 103 - .../V1/DatastreamClient/create_stream.php | 126 - .../delete_connection_profile.php | 84 - .../delete_private_connection.php | 84 - .../V1/DatastreamClient/delete_route.php | 85 - .../V1/DatastreamClient/delete_stream.php | 80 - .../discover_connection_profile.php | 75 - .../V1/DatastreamClient/fetch_static_ips.php | 77 - .../get_connection_profile.php | 75 - .../V1/DatastreamClient/get_location.php | 57 - .../get_private_connection.php | 75 - .../samples/V1/DatastreamClient/get_route.php | 76 - .../V1/DatastreamClient/get_stream.php | 71 - .../V1/DatastreamClient/get_stream_object.php | 76 - .../list_connection_profiles.php | 77 - .../V1/DatastreamClient/list_locations.php | 62 - .../list_private_connections.php | 78 - .../V1/DatastreamClient/list_routes.php | 81 - .../DatastreamClient/list_stream_objects.php | 76 - .../V1/DatastreamClient/list_streams.php | 76 - .../DatastreamClient/lookup_stream_object.php | 74 - .../DatastreamClient/start_backfill_job.php | 77 - .../V1/DatastreamClient/stop_backfill_job.php | 77 - .../update_connection_profile.php | 84 - .../V1/DatastreamClient/update_stream.php | 115 - .../v1/src/V1/Client/DatastreamClient.php | 1187 ------- .../Datastream/v1/src/V1/gapic_metadata.json | 158 - .../resources/datastream_client_config.json | 184 -- .../datastream_descriptor_config.php | 510 --- .../datastream_rest_client_config.php | 411 --- .../Unit/V1/Client/DatastreamClientTest.php | 2817 ----------------- 184 files changed, 879 insertions(+), 23629 deletions(-) rename {owl-bot-staging/Datastream/v1 => Datastream}/samples/V1/DatastreamClient/run_stream.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/BigQueryDestinationConfig/AppendOnly.php (83%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/BigQueryDestinationConfig/Merge.php (83%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/CdcStrategy.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/CdcStrategy/MostRecentStartPosition.php (82%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/CdcStrategy/NextAvailableStartPosition.php (81%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/CdcStrategy/SpecificStartPosition.php (95%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/MysqlLogPosition.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/MysqlSourceConfig/BinaryLogPosition.php (81%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/MysqlSourceConfig/Gtid.php (83%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleAsmConfig.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleScnPosition.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleSourceConfig/BinaryLogParser.php (94%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php (93%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php (80%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleSourceConfig/LogMiner.php (82%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/OracleSslConfig.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/RunStreamRequest.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php (92%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerChangeTables.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerColumn.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerLsnPosition.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerProfile.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerRdbms.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerSchema.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerSourceConfig.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerTable.php (100%) rename {owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream => Datastream/src}/V1/SqlServerTransactionLogs.php (100%) delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/Datastream.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/DatastreamResources.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/AvroFileFormat.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php delete mode 100644 owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php delete mode 100644 owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php delete mode 100644 owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php delete mode 100644 owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json delete mode 100644 owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php delete mode 100644 owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php delete mode 100644 owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php diff --git a/Datastream/metadata/V1/Datastream.php b/Datastream/metadata/V1/Datastream.php index 64eb352b235bed269315df1769ad2c91a6cf34fd..a55c2007c82933f17c2f06e4fec4ee88e9d187db 100644 GIT binary patch delta 265 zcmZoq`INqam4#(?JeT%FZ|%({EP9MAM_ITOCig2SY;I%S#wa7?#wAc(m=j-|T2z)= z6kn8*lv^y3uE40lZKO5XkzbahFeex+HQAJ1kL55Emm*NF^yDV?3&d;P?9DNsgMASr zmq1Wy-sA>8S0N!ME}rC+#K@w zW)@80V%ns$Ia7KnC;KKwE>4g+9~D)YLG%P=UB-yX`;_H4nl3+?%w(dZKe<6wi=)=6 Ps5H-tQET&G6)s)?Kl)Mo delta 72 zcmV-O0Js10XNP341q1}KTM8?YODnT91TFyt{R0XhldlIGli(o*vxWt>0h5FWCj$Ec eldT8sv*HMt2(us(eF_5oDzl#)l?k)yCJ7Cc_8GAN diff --git a/Datastream/metadata/V1/DatastreamResources.php b/Datastream/metadata/V1/DatastreamResources.php index d569603d15c077d24ab031aad6c4318904168113..9162ea746bd3a417f6d6b866a296f9059d3a90e6 100644 GIT binary patch delta 2909 zcmZ`*OKjX!6s_%%mOw)C#M-b@0((C>5Q;>D|h3IW6`y!YDlZMC#~-I-$z3e9wutxnggUS_ zzwPTGZ>~o?Wcp>o#Ih>Mj|K&~2U<&pZ!8)fQId@eMeSwiEMBP;iF=i}(NhH9Cs$kc z%{TIGx{!0Q(=>FGxW2VynTAgkfo3!L49mTh1uSWAv<1g9Pm6u0K=!UwbdOW(HP>0P zDnzm9MyuA=bQ!$W@wFs=(;7^7eIWG6v(Q#?%6iqZiK~>6Gd+H|Q5{;%wGR!?I^{Wb zJ0r-?L3Yuy4R=*%HZ{XVSIROsIutqnT$9SJ(Nz~pP7 z)}@FK$(^tibi*`>=P3gBbUyCs$*rD-n|eV9cx;IKD2iw=!wpp71t!;Y?7y-!?MlFN~u{gq?jMj zqV5b`Own4OLeCA{7xfVRwQD}N0G+;T*q#v%8GH{i4>i%_Tu52bht zGA2F`K2|;7C2lvy>@GCzrZ|LWjz*iGQBy%_0=GEO`eG@^NrFD*XF>c#qJQ+S_sf@{ zE8fhGXR%?a5PG~@qZ@-s`c1BVZ>$mO01UqXiL!5%lrZXXj9R1L=F*Q0KY^#%7hRBz z8oO?$rXaztx1{m26#SrG6!yyJLGhy5u~ z$tpqlE1!h@Ji+_Z0TG;r;c{Bj=eW`v+UpA!zN z*g4Uu+5$<=Rp^ABY_NN{(QwP)wq!}Y=vqF}t4@goNA^q$;;nSBrri`3c>?5$;rTjF z90y1Ks_t7=qGaeTZBSJI42};9!XEhy%Nj23?j4A<9do0M3L;fLoC ze3qDqEi&jr9m&@=>aqs++2kc(H?A5MpI=)UL%|kUB^Khmr_pM%VYDqZfj+NBOtylz zl7{MhjFGOzNsD#-c6@3-^xY#Fbr-1jjz_&AVsmfDj6+54uC6i(u+k delta 302 zcmV+}0nz@kg#pK9u-*a!mS2p%$e9lkpfT8bTNf7Hna1XJub+ zVrpe$baP*5VQyq>X>Mn;-x})zvrr+*0Rr9ulN=-710wVSv&*;1PU3G za4i|LR4En#vlA;D0TMzG3JzppbYXL4bYEj{Zf0p`vt=wq0Rqtqv#Tw>0s@Hw1PT_DFE$plk2O94lRP)hlTbJo5&8oP3qoOIYi4O|Y)Wrp5*nJTUs#vspn{0l+e7 AWdHyG diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/run_stream.php b/Datastream/samples/V1/DatastreamClient/run_stream.php similarity index 100% rename from owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/run_stream.php rename to Datastream/samples/V1/DatastreamClient/run_stream.php diff --git a/Datastream/src/V1/BackfillJob.php b/Datastream/src/V1/BackfillJob.php index 5c846db15e39..b10e512e8005 100644 --- a/Datastream/src/V1/BackfillJob.php +++ b/Datastream/src/V1/BackfillJob.php @@ -16,9 +16,9 @@ class BackfillJob extends \Google\Protobuf\Internal\Message { /** - * Backfill job state. + * Output only. Backfill job state. * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1; + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $state = 0; /** @@ -53,7 +53,7 @@ class BackfillJob extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $state - * Backfill job state. + * Output only. Backfill job state. * @type int $trigger * Backfill job's triggering reason. * @type \Google\Protobuf\Timestamp $last_start_time @@ -70,9 +70,9 @@ public function __construct($data = NULL) { } /** - * Backfill job state. + * Output only. Backfill job state. * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1; + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getState() @@ -81,9 +81,9 @@ public function getState() } /** - * Backfill job state. + * Output only. Backfill job state. * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1; + * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ diff --git a/Datastream/src/V1/BigQueryDestinationConfig.php b/Datastream/src/V1/BigQueryDestinationConfig.php index 91523007910e..af848464cd9d 100644 --- a/Datastream/src/V1/BigQueryDestinationConfig.php +++ b/Datastream/src/V1/BigQueryDestinationConfig.php @@ -25,6 +25,7 @@ class BigQueryDestinationConfig extends \Google\Protobuf\Internal\Message */ protected $data_freshness = null; protected $dataset_config; + protected $write_mode; /** * Constructor. @@ -41,6 +42,10 @@ class BigQueryDestinationConfig extends \Google\Protobuf\Internal\Message * the stream. Editing this field will only affect new tables created in the * future, but existing tables will not be impacted. Lower values mean that * queries will return fresher data, but may result in higher cost. + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge $merge + * The standard mode + * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly $append_only + * Append only mode * } */ public function __construct($data = NULL) { @@ -152,6 +157,68 @@ public function setDataFreshness($var) return $this; } + /** + * The standard mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.Merge merge = 301; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge|null + */ + public function getMerge() + { + return $this->readOneof(301); + } + + public function hasMerge() + { + return $this->hasOneof(301); + } + + /** + * The standard mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.Merge merge = 301; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge $var + * @return $this + */ + public function setMerge($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge::class); + $this->writeOneof(301, $var); + + return $this; + } + + /** + * Append only mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly append_only = 302; + * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly|null + */ + public function getAppendOnly() + { + return $this->readOneof(302); + } + + public function hasAppendOnly() + { + return $this->hasOneof(302); + } + + /** + * Append only mode + * + * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly append_only = 302; + * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly $var + * @return $this + */ + public function setAppendOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly::class); + $this->writeOneof(302, $var); + + return $this; + } + /** * @return string */ @@ -160,5 +227,13 @@ public function getDatasetConfig() return $this->whichOneof("dataset_config"); } + /** + * @return string + */ + public function getWriteMode() + { + return $this->whichOneof("write_mode"); + } + } diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php b/Datastream/src/V1/BigQueryDestinationConfig/AppendOnly.php similarity index 83% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php rename to Datastream/src/V1/BigQueryDestinationConfig/AppendOnly.php index 59b3c8429b74..995ed7db8f4c 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/AppendOnly.php +++ b/Datastream/src/V1/BigQueryDestinationConfig/AppendOnly.php @@ -32,6 +32,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AppendOnly::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_AppendOnly::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php b/Datastream/src/V1/BigQueryDestinationConfig/Merge.php similarity index 83% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php rename to Datastream/src/V1/BigQueryDestinationConfig/Merge.php index 44303457fb94..87e439aed337 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/Merge.php +++ b/Datastream/src/V1/BigQueryDestinationConfig/Merge.php @@ -32,6 +32,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Merge::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_Merge::class); diff --git a/Datastream/src/V1/BigQueryDestinationConfig/SingleTargetDataset.php b/Datastream/src/V1/BigQueryDestinationConfig/SingleTargetDataset.php index 67faff7d5bbd..2aaea7158350 100644 --- a/Datastream/src/V1/BigQueryDestinationConfig/SingleTargetDataset.php +++ b/Datastream/src/V1/BigQueryDestinationConfig/SingleTargetDataset.php @@ -17,6 +17,8 @@ class SingleTargetDataset extends \Google\Protobuf\Internal\Message { /** * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. * * Generated from protobuf field string dataset_id = 1; */ @@ -30,6 +32,8 @@ class SingleTargetDataset extends \Google\Protobuf\Internal\Message * * @type string $dataset_id * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. * } */ public function __construct($data = NULL) { @@ -39,6 +43,8 @@ public function __construct($data = NULL) { /** * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. * * Generated from protobuf field string dataset_id = 1; * @return string @@ -50,6 +56,8 @@ public function getDatasetId() /** * The dataset ID of the target dataset. + * DatasetIds allowed characters: + * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. * * Generated from protobuf field string dataset_id = 1; * @param string $var diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy.php b/Datastream/src/V1/CdcStrategy.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy.php rename to Datastream/src/V1/CdcStrategy.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php b/Datastream/src/V1/CdcStrategy/MostRecentStartPosition.php similarity index 82% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php rename to Datastream/src/V1/CdcStrategy/MostRecentStartPosition.php index da43a6c9ae9a..c7e06739f511 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/MostRecentStartPosition.php +++ b/Datastream/src/V1/CdcStrategy/MostRecentStartPosition.php @@ -32,6 +32,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MostRecentStartPosition::class, \Google\Cloud\Datastream\V1\CdcStrategy_MostRecentStartPosition::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php b/Datastream/src/V1/CdcStrategy/NextAvailableStartPosition.php similarity index 81% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php rename to Datastream/src/V1/CdcStrategy/NextAvailableStartPosition.php index d26b5b70fb49..39f6db4be4c8 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/NextAvailableStartPosition.php +++ b/Datastream/src/V1/CdcStrategy/NextAvailableStartPosition.php @@ -32,6 +32,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NextAvailableStartPosition::class, \Google\Cloud\Datastream\V1\CdcStrategy_NextAvailableStartPosition::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php b/Datastream/src/V1/CdcStrategy/SpecificStartPosition.php similarity index 95% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php rename to Datastream/src/V1/CdcStrategy/SpecificStartPosition.php index db07650754a9..8c9d19f71790 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CdcStrategy/SpecificStartPosition.php +++ b/Datastream/src/V1/CdcStrategy/SpecificStartPosition.php @@ -139,6 +139,4 @@ public function getPosition() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpecificStartPosition::class, \Google\Cloud\Datastream\V1\CdcStrategy_SpecificStartPosition::class); diff --git a/Datastream/src/V1/Client/DatastreamClient.php b/Datastream/src/V1/Client/DatastreamClient.php index 1a48e64914cd..7af6ab55ae13 100644 --- a/Datastream/src/V1/Client/DatastreamClient.php +++ b/Datastream/src/V1/Client/DatastreamClient.php @@ -59,6 +59,7 @@ use Google\Cloud\Datastream\V1\LookupStreamObjectRequest; use Google\Cloud\Datastream\V1\PrivateConnection; use Google\Cloud\Datastream\V1\Route; +use Google\Cloud\Datastream\V1\RunStreamRequest; use Google\Cloud\Datastream\V1\StartBackfillJobRequest; use Google\Cloud\Datastream\V1\StartBackfillJobResponse; use Google\Cloud\Datastream\V1\StopBackfillJobRequest; @@ -106,6 +107,7 @@ * @method PromiseInterface listStreamObjectsAsync(ListStreamObjectsRequest $request, array $optionalArgs = []) * @method PromiseInterface listStreamsAsync(ListStreamsRequest $request, array $optionalArgs = []) * @method PromiseInterface lookupStreamObjectAsync(LookupStreamObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface runStreamAsync(RunStreamRequest $request, array $optionalArgs = []) * @method PromiseInterface startBackfillJobAsync(StartBackfillJobRequest $request, array $optionalArgs = []) * @method PromiseInterface stopBackfillJobAsync(StopBackfillJobRequest $request, array $optionalArgs = []) * @method PromiseInterface updateConnectionProfileAsync(UpdateConnectionProfileRequest $request, array $optionalArgs = []) @@ -1022,6 +1024,33 @@ public function lookupStreamObject(LookupStreamObjectRequest $request, array $ca return $this->startApiCall('LookupStreamObject', $request, $callOptions)->wait(); } + /** + * Use this method to start, resume or recover a stream with a non default CDC + * strategy. + * + * The async variant is {@see DatastreamClient::runStreamAsync()} . + * + * @example samples/V1/DatastreamClient/run_stream.php + * + * @param RunStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runStream(RunStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunStream', $request, $callOptions)->wait(); + } + /** * Use this method to start a backfill job for the specified stream object. * diff --git a/Datastream/src/V1/ConnectionProfile.php b/Datastream/src/V1/ConnectionProfile.php index dcf8de7e4aaf..3fa2bf4f0db8 100644 --- a/Datastream/src/V1/ConnectionProfile.php +++ b/Datastream/src/V1/ConnectionProfile.php @@ -75,6 +75,8 @@ class ConnectionProfile extends \Google\Protobuf\Internal\Message * BigQuery Connection Profile configuration. * @type \Google\Cloud\Datastream\V1\PostgresqlProfile $postgresql_profile * PostgreSQL Connection Profile configuration. + * @type \Google\Cloud\Datastream\V1\SqlServerProfile $sql_server_profile + * SQLServer Connection Profile configuration. * @type \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity $static_service_ip_connectivity * Static Service IP connectivity. * @type \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity $forward_ssh_connectivity @@ -393,6 +395,37 @@ public function setPostgresqlProfile($var) return $this; } + /** + * SQLServer Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerProfile sql_server_profile = 105; + * @return \Google\Cloud\Datastream\V1\SqlServerProfile|null + */ + public function getSqlServerProfile() + { + return $this->readOneof(105); + } + + public function hasSqlServerProfile() + { + return $this->hasOneof(105); + } + + /** + * SQLServer Connection Profile configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerProfile sql_server_profile = 105; + * @param \Google\Cloud\Datastream\V1\SqlServerProfile $var + * @return $this + */ + public function setSqlServerProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerProfile::class); + $this->writeOneof(105, $var); + + return $this; + } + /** * Static Service IP connectivity. * diff --git a/Datastream/src/V1/DiscoverConnectionProfileRequest.php b/Datastream/src/V1/DiscoverConnectionProfileRequest.php index 3322add55e17..39bbb78566ce 100644 --- a/Datastream/src/V1/DiscoverConnectionProfileRequest.php +++ b/Datastream/src/V1/DiscoverConnectionProfileRequest.php @@ -50,6 +50,8 @@ class DiscoverConnectionProfileRequest extends \Google\Protobuf\Internal\Message * MySQL RDBMS to enrich with child data objects and metadata. * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_rdbms * PostgreSQL RDBMS to enrich with child data objects and metadata. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_rdbms + * SQLServer RDBMS to enrich with child data objects and metadata. * } */ public function __construct($data = NULL) { @@ -304,6 +306,37 @@ public function setPostgresqlRdbms($var) return $this; } + /** + * SQLServer RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getSqlServerRdbms() + { + return $this->readOneof(103); + } + + public function hasSqlServerRdbms() + { + return $this->hasOneof(103); + } + + /** + * SQLServer RDBMS to enrich with child data objects and metadata. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setSqlServerRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->writeOneof(103, $var); + + return $this; + } + /** * @return string */ diff --git a/Datastream/src/V1/DiscoverConnectionProfileResponse.php b/Datastream/src/V1/DiscoverConnectionProfileResponse.php index 62c0819c8d3b..22ea94898f57 100644 --- a/Datastream/src/V1/DiscoverConnectionProfileResponse.php +++ b/Datastream/src/V1/DiscoverConnectionProfileResponse.php @@ -29,6 +29,8 @@ class DiscoverConnectionProfileResponse extends \Google\Protobuf\Internal\Messag * Enriched MySQL RDBMS object. * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_rdbms * Enriched PostgreSQL RDBMS object. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_rdbms + * Enriched SQLServer RDBMS object. * } */ public function __construct($data = NULL) { @@ -129,6 +131,37 @@ public function setPostgresqlRdbms($var) return $this; } + /** + * Enriched SQLServer RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getSqlServerRdbms() + { + return $this->readOneof(103); + } + + public function hasSqlServerRdbms() + { + return $this->hasOneof(103); + } + + /** + * Enriched SQLServer RDBMS object. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setSqlServerRdbms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->writeOneof(103, $var); + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlLogPosition.php b/Datastream/src/V1/MysqlLogPosition.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlLogPosition.php rename to Datastream/src/V1/MysqlLogPosition.php diff --git a/Datastream/src/V1/MysqlProfile.php b/Datastream/src/V1/MysqlProfile.php index 24b1ef5f1d2a..336ec4bbb055 100644 --- a/Datastream/src/V1/MysqlProfile.php +++ b/Datastream/src/V1/MysqlProfile.php @@ -10,6 +10,7 @@ /** * MySQL database profile. + * Next ID: 7. * * Generated from protobuf message google.cloud.datastream.v1.MysqlProfile */ @@ -34,9 +35,10 @@ class MysqlProfile extends \Google\Protobuf\Internal\Message */ protected $username = ''; /** - * Required. Input only. Password for the MySQL connection. + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; */ protected $password = ''; /** @@ -59,7 +61,8 @@ class MysqlProfile extends \Google\Protobuf\Internal\Message * @type string $username * Required. Username for the MySQL connection. * @type string $password - * Required. Input only. Password for the MySQL connection. + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. * @type \Google\Cloud\Datastream\V1\MysqlSslConfig $ssl_config * SSL configuration for the MySQL connection. * } @@ -148,9 +151,10 @@ public function setUsername($var) } /** - * Required. Input only. Password for the MySQL connection. + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; * @return string */ public function getPassword() @@ -159,9 +163,10 @@ public function getPassword() } /** - * Required. Input only. Password for the MySQL connection. + * Optional. Input only. Password for the MySQL connection. Mutually exclusive + * with the `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; * @param string $var * @return $this */ diff --git a/Datastream/src/V1/MysqlSourceConfig.php b/Datastream/src/V1/MysqlSourceConfig.php index a9ec70fcda30..2a76e1091653 100644 --- a/Datastream/src/V1/MysqlSourceConfig.php +++ b/Datastream/src/V1/MysqlSourceConfig.php @@ -42,6 +42,7 @@ class MysqlSourceConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; */ protected $max_concurrent_backfill_tasks = 0; + protected $cdc_method; /** * Constructor. @@ -60,6 +61,10 @@ class MysqlSourceConfig extends \Google\Protobuf\Internal\Message * Maximum number of concurrent backfill tasks. The number should be non * negative. If not set (or set to 0), the system's default value will be * used. + * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition $binary_log_position + * Use Binary log position based replication. + * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid $gtid + * Use GTID based replication. * } */ public function __construct($data = NULL) { @@ -197,5 +202,75 @@ public function setMaxConcurrentBackfillTasks($var) return $this; } + /** + * Use Binary log position based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition binary_log_position = 101; + * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition|null + */ + public function getBinaryLogPosition() + { + return $this->readOneof(101); + } + + public function hasBinaryLogPosition() + { + return $this->hasOneof(101); + } + + /** + * Use Binary log position based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition binary_log_position = 101; + * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition $var + * @return $this + */ + public function setBinaryLogPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Use GTID based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.Gtid gtid = 102; + * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid|null + */ + public function getGtid() + { + return $this->readOneof(102); + } + + public function hasGtid() + { + return $this->hasOneof(102); + } + + /** + * Use GTID based replication. + * + * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.Gtid gtid = 102; + * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid $var + * @return $this + */ + public function setGtid($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * @return string + */ + public function getCdcMethod() + { + return $this->whichOneof("cdc_method"); + } + } diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php b/Datastream/src/V1/MysqlSourceConfig/BinaryLogPosition.php similarity index 81% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php rename to Datastream/src/V1/MysqlSourceConfig/BinaryLogPosition.php index 5827d7781d6f..82b3c70930e7 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/BinaryLogPosition.php +++ b/Datastream/src/V1/MysqlSourceConfig/BinaryLogPosition.php @@ -31,6 +31,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BinaryLogPosition::class, \Google\Cloud\Datastream\V1\MysqlSourceConfig_BinaryLogPosition::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php b/Datastream/src/V1/MysqlSourceConfig/Gtid.php similarity index 83% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php rename to Datastream/src/V1/MysqlSourceConfig/Gtid.php index 53356cfa276c..08cdc58ccf5e 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig/Gtid.php +++ b/Datastream/src/V1/MysqlSourceConfig/Gtid.php @@ -31,6 +31,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Gtid::class, \Google\Cloud\Datastream\V1\MysqlSourceConfig_Gtid::class); diff --git a/Datastream/src/V1/OperationMetadata.php b/Datastream/src/V1/OperationMetadata.php index c0add90462c6..2dae14aae60b 100644 --- a/Datastream/src/V1/OperationMetadata.php +++ b/Datastream/src/V1/OperationMetadata.php @@ -48,9 +48,10 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message /** * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -87,9 +88,10 @@ class OperationMetadata extends \Google\Protobuf\Internal\Message * @type bool $requested_cancellation * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. * @type string $api_version * Output only. API version used to start the operation. * @type \Google\Cloud\Datastream\V1\ValidationResult $validation_result @@ -254,9 +256,10 @@ public function setStatusMessage($var) /** * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool @@ -269,9 +272,10 @@ public function getRequestedCancellation() /** * Output only. Identifies whether the user has requested cancellation * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. * * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleAsmConfig.php b/Datastream/src/V1/OracleAsmConfig.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleAsmConfig.php rename to Datastream/src/V1/OracleAsmConfig.php diff --git a/Datastream/src/V1/OracleProfile.php b/Datastream/src/V1/OracleProfile.php index 3f710b38ec38..7df5fc773678 100644 --- a/Datastream/src/V1/OracleProfile.php +++ b/Datastream/src/V1/OracleProfile.php @@ -10,6 +10,7 @@ /** * Oracle database profile. + * Next ID: 10. * * Generated from protobuf message google.cloud.datastream.v1.OracleProfile */ @@ -34,9 +35,10 @@ class OracleProfile extends \Google\Protobuf\Internal\Message */ protected $username = ''; /** - * Required. Password for the Oracle connection. + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; */ protected $password = ''; /** @@ -51,6 +53,25 @@ class OracleProfile extends \Google\Protobuf\Internal\Message * Generated from protobuf field map connection_attributes = 6; */ private $connection_attributes; + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oracle_ssl_config = null; + /** + * Optional. Configuration for Oracle ASM connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $oracle_asm_config = null; + /** + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * + * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $secret_manager_stored_password = ''; /** * Constructor. @@ -65,11 +86,19 @@ class OracleProfile extends \Google\Protobuf\Internal\Message * @type string $username * Required. Username for the Oracle connection. * @type string $password - * Required. Password for the Oracle connection. + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. * @type string $database_service * Required. Database for the Oracle connection. * @type array|\Google\Protobuf\Internal\MapField $connection_attributes * Connection string attributes + * @type \Google\Cloud\Datastream\V1\OracleSslConfig $oracle_ssl_config + * Optional. SSL configuration for the Oracle connection. + * @type \Google\Cloud\Datastream\V1\OracleAsmConfig $oracle_asm_config + * Optional. Configuration for Oracle ASM connection. + * @type string $secret_manager_stored_password + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. * } */ public function __construct($data = NULL) { @@ -156,9 +185,10 @@ public function setUsername($var) } /** - * Required. Password for the Oracle connection. + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPassword() @@ -167,9 +197,10 @@ public function getPassword() } /** - * Required. Password for the Oracle connection. + * Optional. Password for the Oracle connection. Mutually exclusive with the + * `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,5 +264,105 @@ public function setConnectionAttributes($var) return $this; } + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\OracleSslConfig|null + */ + public function getOracleSslConfig() + { + return $this->oracle_ssl_config; + } + + public function hasOracleSslConfig() + { + return isset($this->oracle_ssl_config); + } + + public function clearOracleSslConfig() + { + unset($this->oracle_ssl_config); + } + + /** + * Optional. SSL configuration for the Oracle connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\OracleSslConfig $var + * @return $this + */ + public function setOracleSslConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSslConfig::class); + $this->oracle_ssl_config = $var; + + return $this; + } + + /** + * Optional. Configuration for Oracle ASM connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Datastream\V1\OracleAsmConfig|null + */ + public function getOracleAsmConfig() + { + return $this->oracle_asm_config; + } + + public function hasOracleAsmConfig() + { + return isset($this->oracle_asm_config); + } + + public function clearOracleAsmConfig() + { + unset($this->oracle_asm_config); + } + + /** + * Optional. Configuration for Oracle ASM connection. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Datastream\V1\OracleAsmConfig $var + * @return $this + */ + public function setOracleAsmConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleAsmConfig::class); + $this->oracle_asm_config = $var; + + return $this; + } + + /** + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * + * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSecretManagerStoredPassword() + { + return $this->secret_manager_stored_password; + } + + /** + * Optional. A reference to a Secret Manager resource name storing the Oracle + * connection password. Mutually exclusive with the `password` field. + * + * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSecretManagerStoredPassword($var) + { + GPBUtil::checkString($var, True); + $this->secret_manager_stored_password = $var; + + return $this; + } + } diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleScnPosition.php b/Datastream/src/V1/OracleScnPosition.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleScnPosition.php rename to Datastream/src/V1/OracleScnPosition.php diff --git a/Datastream/src/V1/OracleSourceConfig.php b/Datastream/src/V1/OracleSourceConfig.php index 9057b729f50b..a0c1272ab88b 100644 --- a/Datastream/src/V1/OracleSourceConfig.php +++ b/Datastream/src/V1/OracleSourceConfig.php @@ -42,6 +42,7 @@ class OracleSourceConfig extends \Google\Protobuf\Internal\Message */ protected $max_concurrent_backfill_tasks = 0; protected $large_objects_handling; + protected $cdc_method; /** * Constructor. @@ -62,7 +63,11 @@ class OracleSourceConfig extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects $drop_large_objects * Drop large object values. * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects $stream_large_objects - * Stream large object values. NOTE: This feature is currently experimental. + * Stream large object values. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner $log_miner + * Use LogMiner. + * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser $binary_log_parser + * Use Binary Log Parser. * } */ public function __construct($data = NULL) { @@ -230,7 +235,7 @@ public function setDropLargeObjects($var) } /** - * Stream large object values. NOTE: This feature is currently experimental. + * Stream large object values. * * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects stream_large_objects = 102; * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects|null @@ -246,7 +251,7 @@ public function hasStreamLargeObjects() } /** - * Stream large object values. NOTE: This feature is currently experimental. + * Stream large object values. * * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects stream_large_objects = 102; * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects $var @@ -260,6 +265,68 @@ public function setStreamLargeObjects($var) return $this; } + /** + * Use LogMiner. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.LogMiner log_miner = 103; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner|null + */ + public function getLogMiner() + { + return $this->readOneof(103); + } + + public function hasLogMiner() + { + return $this->hasOneof(103); + } + + /** + * Use LogMiner. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.LogMiner log_miner = 103; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner $var + * @return $this + */ + public function setLogMiner($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * Use Binary Log Parser. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser binary_log_parser = 104; + * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser|null + */ + public function getBinaryLogParser() + { + return $this->readOneof(104); + } + + public function hasBinaryLogParser() + { + return $this->hasOneof(104); + } + + /** + * Use Binary Log Parser. + * + * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser binary_log_parser = 104; + * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser $var + * @return $this + */ + public function setBinaryLogParser($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser::class); + $this->writeOneof(104, $var); + + return $this; + } + /** * @return string */ @@ -268,5 +335,13 @@ public function getLargeObjectsHandling() return $this->whichOneof("large_objects_handling"); } + /** + * @return string + */ + public function getCdcMethod() + { + return $this->whichOneof("cdc_method"); + } + } diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php b/Datastream/src/V1/OracleSourceConfig/BinaryLogParser.php similarity index 94% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php rename to Datastream/src/V1/OracleSourceConfig/BinaryLogParser.php index 347cdc436294..e02ad377d294 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser.php +++ b/Datastream/src/V1/OracleSourceConfig/BinaryLogParser.php @@ -106,6 +106,4 @@ public function getLogFileAccess() } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BinaryLogParser::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_BinaryLogParser::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php b/Datastream/src/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php similarity index 93% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php rename to Datastream/src/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php index 13282a3dce06..ac7ee14ef8ea 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php +++ b/Datastream/src/V1/OracleSourceConfig/BinaryLogParser/LogFileDirectories.php @@ -99,6 +99,4 @@ public function setArchivedLogDirectory($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogFileDirectories::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_BinaryLogParser_LogFileDirectories::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php b/Datastream/src/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php similarity index 80% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php rename to Datastream/src/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php index e5873cabc938..678da5b1c3f7 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php +++ b/Datastream/src/V1/OracleSourceConfig/BinaryLogParser/OracleAsmLogFileAccess.php @@ -31,6 +31,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OracleAsmLogFileAccess::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_BinaryLogParser_OracleAsmLogFileAccess::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php b/Datastream/src/V1/OracleSourceConfig/LogMiner.php similarity index 82% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php rename to Datastream/src/V1/OracleSourceConfig/LogMiner.php index 81438b0e60f7..d6503f60ecce 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/LogMiner.php +++ b/Datastream/src/V1/OracleSourceConfig/LogMiner.php @@ -31,6 +31,4 @@ public function __construct($data = NULL) { } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogMiner::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_LogMiner::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSslConfig.php b/Datastream/src/V1/OracleSslConfig.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSslConfig.php rename to Datastream/src/V1/OracleSslConfig.php diff --git a/Datastream/src/V1/PostgresqlProfile.php b/Datastream/src/V1/PostgresqlProfile.php index 77f3ac571a76..98271511af72 100644 --- a/Datastream/src/V1/PostgresqlProfile.php +++ b/Datastream/src/V1/PostgresqlProfile.php @@ -34,9 +34,10 @@ class PostgresqlProfile extends \Google\Protobuf\Internal\Message */ protected $username = ''; /** - * Required. Password for the PostgreSQL connection. + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; */ protected $password = ''; /** @@ -59,7 +60,8 @@ class PostgresqlProfile extends \Google\Protobuf\Internal\Message * @type string $username * Required. Username for the PostgreSQL connection. * @type string $password - * Required. Password for the PostgreSQL connection. + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. * @type string $database * Required. Database for the PostgreSQL connection. * } @@ -148,9 +150,10 @@ public function setUsername($var) } /** - * Required. Password for the PostgreSQL connection. + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPassword() @@ -159,9 +162,10 @@ public function getPassword() } /** - * Required. Password for the PostgreSQL connection. + * Optional. Password for the PostgreSQL connection. Mutually exclusive with + * the `secret_manager_stored_password` field. * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/RunStreamRequest.php b/Datastream/src/V1/RunStreamRequest.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/RunStreamRequest.php rename to Datastream/src/V1/RunStreamRequest.php diff --git a/Datastream/src/V1/SourceConfig.php b/Datastream/src/V1/SourceConfig.php index d088db6079e1..6d1f9348d6e8 100644 --- a/Datastream/src/V1/SourceConfig.php +++ b/Datastream/src/V1/SourceConfig.php @@ -39,6 +39,8 @@ class SourceConfig extends \Google\Protobuf\Internal\Message * MySQL data source configuration. * @type \Google\Cloud\Datastream\V1\PostgresqlSourceConfig $postgresql_source_config * PostgreSQL data source configuration. + * @type \Google\Cloud\Datastream\V1\SqlServerSourceConfig $sql_server_source_config + * SQLServer data source configuration. * } */ public function __construct($data = NULL) { @@ -167,6 +169,37 @@ public function setPostgresqlSourceConfig($var) return $this; } + /** + * SQLServer data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerSourceConfig sql_server_source_config = 103; + * @return \Google\Cloud\Datastream\V1\SqlServerSourceConfig|null + */ + public function getSqlServerSourceConfig() + { + return $this->readOneof(103); + } + + public function hasSqlServerSourceConfig() + { + return $this->hasOneof(103); + } + + /** + * SQLServer data source configuration. + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerSourceConfig sql_server_source_config = 103; + * @param \Google\Cloud\Datastream\V1\SqlServerSourceConfig $var + * @return $this + */ + public function setSqlServerSourceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerSourceConfig::class); + $this->writeOneof(103, $var); + + return $this; + } + /** * @return string */ diff --git a/Datastream/src/V1/SourceObjectIdentifier.php b/Datastream/src/V1/SourceObjectIdentifier.php index 54fc66577ec0..55441bf10169 100644 --- a/Datastream/src/V1/SourceObjectIdentifier.php +++ b/Datastream/src/V1/SourceObjectIdentifier.php @@ -29,6 +29,8 @@ class SourceObjectIdentifier extends \Google\Protobuf\Internal\Message * Mysql data source object identifier. * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier $postgresql_identifier * PostgreSQL data source object identifier. + * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier $sql_server_identifier + * SQLServer data source object identifier. * } */ public function __construct($data = NULL) { @@ -129,6 +131,37 @@ public function setPostgresqlIdentifier($var) return $this; } + /** + * SQLServer data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier sql_server_identifier = 4; + * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier|null + */ + public function getSqlServerIdentifier() + { + return $this->readOneof(4); + } + + public function hasSqlServerIdentifier() + { + return $this->hasOneof(4); + } + + /** + * SQLServer data source object identifier. + * + * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier sql_server_identifier = 4; + * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier $var + * @return $this + */ + public function setSqlServerIdentifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier::class); + $this->writeOneof(4, $var); + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php b/Datastream/src/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php similarity index 92% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php rename to Datastream/src/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php index 0799b2d3f36f..f6cc4dc0444b 100644 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php +++ b/Datastream/src/V1/SourceObjectIdentifier/SqlServerObjectIdentifier.php @@ -99,6 +99,4 @@ public function setTable($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SqlServerObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_SqlServerObjectIdentifier::class); diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerChangeTables.php b/Datastream/src/V1/SqlServerChangeTables.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerChangeTables.php rename to Datastream/src/V1/SqlServerChangeTables.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerColumn.php b/Datastream/src/V1/SqlServerColumn.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerColumn.php rename to Datastream/src/V1/SqlServerColumn.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerLsnPosition.php b/Datastream/src/V1/SqlServerLsnPosition.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerLsnPosition.php rename to Datastream/src/V1/SqlServerLsnPosition.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerProfile.php b/Datastream/src/V1/SqlServerProfile.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerProfile.php rename to Datastream/src/V1/SqlServerProfile.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerRdbms.php b/Datastream/src/V1/SqlServerRdbms.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerRdbms.php rename to Datastream/src/V1/SqlServerRdbms.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSchema.php b/Datastream/src/V1/SqlServerSchema.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSchema.php rename to Datastream/src/V1/SqlServerSchema.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSourceConfig.php b/Datastream/src/V1/SqlServerSourceConfig.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerSourceConfig.php rename to Datastream/src/V1/SqlServerSourceConfig.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTable.php b/Datastream/src/V1/SqlServerTable.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTable.php rename to Datastream/src/V1/SqlServerTable.php diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTransactionLogs.php b/Datastream/src/V1/SqlServerTransactionLogs.php similarity index 100% rename from owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SqlServerTransactionLogs.php rename to Datastream/src/V1/SqlServerTransactionLogs.php diff --git a/Datastream/src/V1/Stream.php b/Datastream/src/V1/Stream.php index 790fd1e7c8db..031abfdec7bf 100644 --- a/Datastream/src/V1/Stream.php +++ b/Datastream/src/V1/Stream.php @@ -78,6 +78,13 @@ class Stream extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; */ protected $customer_managed_encryption_key = null; + /** + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * + * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_recovery_time = null; protected $backfill_strategy; /** @@ -114,6 +121,9 @@ class Stream extends \Google\Protobuf\Internal\Message * If provided, it will be used to encrypt the data. * If left blank, data will be encrypted using an internal Stream-specific * encryption key provisioned through KMS. + * @type \Google\Protobuf\Timestamp $last_recovery_time + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. * } */ public function __construct($data = NULL) { @@ -501,6 +511,44 @@ public function setCustomerManagedEncryptionKey($var) return $this; } + /** + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * + * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastRecoveryTime() + { + return $this->last_recovery_time; + } + + public function hasLastRecoveryTime() + { + return isset($this->last_recovery_time); + } + + public function clearLastRecoveryTime() + { + unset($this->last_recovery_time); + } + + /** + * Output only. If the stream was recovered, the time of the last recovery. + * Note: This field is currently experimental. + * + * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastRecoveryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_recovery_time = $var; + + return $this; + } + /** * @return string */ diff --git a/Datastream/src/V1/Stream/BackfillAllStrategy.php b/Datastream/src/V1/Stream/BackfillAllStrategy.php index 5a4b7c65c48f..26005ea39437 100644 --- a/Datastream/src/V1/Stream/BackfillAllStrategy.php +++ b/Datastream/src/V1/Stream/BackfillAllStrategy.php @@ -30,6 +30,8 @@ class BackfillAllStrategy extends \Google\Protobuf\Internal\Message * MySQL data source objects to avoid backfilling. * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_excluded_objects * PostgreSQL data source objects to avoid backfilling. + * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_excluded_objects + * SQLServer data source objects to avoid backfilling * } */ public function __construct($data = NULL) { @@ -130,6 +132,37 @@ public function setPostgresqlExcludedObjects($var) return $this; } + /** + * SQLServer data source objects to avoid backfilling + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_excluded_objects = 4; + * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null + */ + public function getSqlServerExcludedObjects() + { + return $this->readOneof(4); + } + + public function hasSqlServerExcludedObjects() + { + return $this->hasOneof(4); + } + + /** + * SQLServer data source objects to avoid backfilling + * + * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_excluded_objects = 4; + * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var + * @return $this + */ + public function setSqlServerExcludedObjects($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); + $this->writeOneof(4, $var); + + return $this; + } + /** * @return string */ diff --git a/Datastream/src/V1/Validation.php b/Datastream/src/V1/Validation.php index 9460c7942232..886455b085ce 100644 --- a/Datastream/src/V1/Validation.php +++ b/Datastream/src/V1/Validation.php @@ -22,9 +22,9 @@ class Validation extends \Google\Protobuf\Internal\Message */ protected $description = ''; /** - * Validation execution status. + * Output only. Validation execution status. * - * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2; + * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $state = 0; /** @@ -49,7 +49,7 @@ class Validation extends \Google\Protobuf\Internal\Message * @type string $description * A short description of the validation. * @type int $state - * Validation execution status. + * Output only. Validation execution status. * @type array<\Google\Cloud\Datastream\V1\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $message * Messages reflecting the validation results. * @type string $code @@ -88,9 +88,9 @@ public function setDescription($var) } /** - * Validation execution status. + * Output only. Validation execution status. * - * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2; + * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getState() @@ -99,9 +99,9 @@ public function getState() } /** - * Validation execution status. + * Output only. Validation execution status. * - * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2; + * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ diff --git a/Datastream/src/V1/Validation/State.php b/Datastream/src/V1/Validation/State.php index c8d3d2f02689..7f2f8f9f70fc 100644 --- a/Datastream/src/V1/Validation/State.php +++ b/Datastream/src/V1/Validation/State.php @@ -37,12 +37,19 @@ class State * Generated from protobuf enum PASSED = 3; */ const PASSED = 3; + /** + * Validation executed with warnings. + * + * Generated from protobuf enum WARNING = 4; + */ + const WARNING = 4; private static $valueToName = [ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', self::NOT_EXECUTED => 'NOT_EXECUTED', self::FAILED => 'FAILED', self::PASSED => 'PASSED', + self::WARNING => 'WARNING', ]; public static function name($value) diff --git a/Datastream/src/V1/gapic_metadata.json b/Datastream/src/V1/gapic_metadata.json index bb5d72589835..3246246ddfcc 100644 --- a/Datastream/src/V1/gapic_metadata.json +++ b/Datastream/src/V1/gapic_metadata.json @@ -115,6 +115,11 @@ "lookupStreamObject" ] }, + "RunStream": { + "methods": [ + "runStream" + ] + }, "StartBackfillJob": { "methods": [ "startBackfillJob" diff --git a/Datastream/src/V1/resources/datastream_client_config.json b/Datastream/src/V1/resources/datastream_client_config.json index 143500747736..78c6b53a17dd 100644 --- a/Datastream/src/V1/resources/datastream_client_config.json +++ b/Datastream/src/V1/resources/datastream_client_config.json @@ -143,6 +143,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "RunStream": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "StartBackfillJob": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/Datastream/src/V1/resources/datastream_descriptor_config.php b/Datastream/src/V1/resources/datastream_descriptor_config.php index afce2976857c..8188d319e7f5 100644 --- a/Datastream/src/V1/resources/datastream_descriptor_config.php +++ b/Datastream/src/V1/resources/datastream_descriptor_config.php @@ -175,6 +175,25 @@ ], ], ], + 'RunStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', + 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'UpdateConnectionProfile' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Datastream\V1\ConnectionProfile', diff --git a/Datastream/src/V1/resources/datastream_rest_client_config.php b/Datastream/src/V1/resources/datastream_rest_client_config.php index 124388a78721..9ee59f665e01 100644 --- a/Datastream/src/V1/resources/datastream_rest_client_config.php +++ b/Datastream/src/V1/resources/datastream_rest_client_config.php @@ -272,6 +272,18 @@ ], ], ], + 'RunStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'StartBackfillJob' => [ 'method' => 'post', 'uriTemplate' => '/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob', diff --git a/Datastream/tests/Unit/V1/Client/DatastreamClientTest.php b/Datastream/tests/Unit/V1/Client/DatastreamClientTest.php index d390cf12d841..f8ac939ddea2 100644 --- a/Datastream/tests/Unit/V1/Client/DatastreamClientTest.php +++ b/Datastream/tests/Unit/V1/Client/DatastreamClientTest.php @@ -59,6 +59,7 @@ use Google\Cloud\Datastream\V1\LookupStreamObjectRequest; use Google\Cloud\Datastream\V1\PrivateConnection; use Google\Cloud\Datastream\V1\Route; +use Google\Cloud\Datastream\V1\RunStreamRequest; use Google\Cloud\Datastream\V1\SourceConfig; use Google\Cloud\Datastream\V1\SourceObjectIdentifier; use Google\Cloud\Datastream\V1\StartBackfillJobRequest; @@ -2122,6 +2123,134 @@ public function lookupStreamObjectExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function runStreamTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new RunStreamRequest())->setName($formattedName); + $response = $gapicClient->runStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.datastream.v1.Datastream/RunStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runStreamTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runStreamExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); + $request = (new RunStreamRequest())->setName($formattedName); + $response = $gapicClient->runStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runStreamTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function startBackfillJobTest() { diff --git a/owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/Datastream.php b/owl-bot-staging/Datastream/v1/proto/src/GPBMetadata/Google/Cloud/Datastream/V1/Datastream.php deleted file mode 100644 index a55c2007c82933f17c2f06e4fec4ee88e9d187db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13298 zcmcIrPi)+16|a*fn|$fE%@>+XQ?={5t2Ry38Im^J#cj7tk~VFXwoy{5T^MQb%s7du zW4pE|-B5A>B+f_(A>g(`99AIE3M4LYK`WL@aA1XiazSVhz=b;}-uKVr8GF9*OtU?- zyW{uX_x}F;-m`t}hPUORGwQPGn7$F3HMO#UEOruP1`I~ZMR-4)Qr#wLfqGw2jKVH3JTU9j(jS&8M z-3rQO4P|h_g1-DW;>YCzQOdhJM|QpRTID z8P4e?!+_Fr&wqR}J``7^y`jeIh&;i9?AUfycQ(`gyQD57w%^FK*UNtc+UtP z_rUwmg7OKCZ7-dd=I+I}ES{;wS}jVYPh<3q^ zqRoj;a3Ts!P~QcU#FJkXpcY+Znr}nYIE64Pq6kH37=iZTL8LBOLDk(c{YBStOo};> z1sf2FHS1ezQ=yivF9@|Fc9u6+q zH+W)m0VWl2R>psikPG%@bkuW$a1+uclCeQ$T#(6Fjd+BhTj(f}5STv1mMgPK1x?EY ztv|8XDGQggFoXs}!-w0)!U!6U+_vy48X@5?yOpm%(rCZ!L#HK)6nKF9=1Y6`z{`2} z0Ny9>9>DwK-2<&|e2R|UGQ;ZDI&B#4c!8+FE9fB2ZdQTkX$77^r){^&?hZVpQ30;- z3wRU_d&Z_&4xr=6^+EgxFh+>}6uOU1hZe=Kb`y=a9?W9~)T}iqTV4PN&_6YdC(sec zd^aq|#1PTL+D{d9a>WY5M9oHq>(`(fD!aJ>s_zdJ zbgG@c-2S_0ED1Ht5#0h;TfgBkG*Wk8w7gxoAzJGkuP|JyseWiL-;5~ncRHo zZE|F8QoyXZ`{tvjiXE12F)5_|u$XwRoyEi(trnAl;1+)komw(&Q)2MT=N{BTJU$dY zs9Ut}DF~CAT&ELS1RQU+bRkm|12wF+??RY_j1ZUsE#5_AO^R`ZxP)F|)1*KJO+-GW z2hDS(+CgYK6x>Be0SXwasLVH->YuvQcAIVOtzaAWup;fzo|mZ14K&6ov)P;;Q=xqgzNet0YjtOTPFX;Q zs zC@@%Q^4t>lqRbI#+nj2D>_el`9!ji3F+gaQwvJ`8RA}4tM9UzOr~P;q4Vg}ju`m!# zwn;54V`2bhqY9HViVnh9TWR!l{rCj&fDzV%GOV8hn0Z)_&*;yfao!D@wQ|*feX4EK z$*Ixl^~1(s1O})w2o7N5mU~5XQ2nsI809@9Tp+8Qx*g_*;QGkij4b6Ju|^Y^)+i5E zM*CLOcCY%@PE%tkinfQgJ0T0UB*#2x0G1hoz_~5 zaWNq)Dy@C-!@iG;Y5MXygmE$HPf?8BIkas>ruT^7hB<{b2MP5=R(0LBCnUARx6!sY zMyJ>fnoY0?A^WF}_6rymSTnok*28FJ37uLKBA3q57T`2~t$hnX1>j?7$S0CoTG@Ft zK!4_yaavaNRFJ$HwC^ftlz=&>umTEdhx8DMT69Qk;t9x?=pF72(#R! z2a5!mZ))R25K+esRe^t;p320(R5a7?rk|mvoJ77}p zg_XrjTYgdGMevP}Klx7IoA?d#wDTFOi|eqIAdB0eFkOh2h=u9BLgPlkp8^E% zZ4rg9$h1r25N1hnFyTS%=8GcTem2=b)}d{zNHGFT!$0an6AUX7M_{R=+b{`hP6{`~ z9_8eth6#3}&x>c#X!6WtQ}v=)VBwi*gh4zjN%;vdin?S)>oK%?$}<`KV{lWOeV5!# zZJ08;>1W-z=~Rk;VjDQ>mGayjn(#@|eAl^?>ZpGyXrj%YOzx;QOc@>JKQB(BWBh?x zv|FSPdU0Ax#Y$(IHLN{6RaK#ANeypHF3^&;h1xtMsrxY4?fYso6@dO&=!qf78fp z#?w0AW8y!9Rq=hI+^RTbMyu+btis%!RvV}A zw<}JW(XP#&LF?i)i&VzE`v7Vp+FZ(OA|lIZ!`t%MP#n6f6=)c;X{*C)J_L7usnEWZ z`JQcduyhp|l`|t224r6LXiM?ZzJlkoD_wBuGLfVY{tbCllUS7Ec_|Dg=)2c`nfkh@ zUF(dNg+{gu&2^iqKpg)OAH(9F5AbEF{>c>_eNARkZgrB2-vVwm-vUG|q-}bNQTXq$ zvTxnf;!841TB$`Gq~<4?xE-Yu7{YRcM(3V(n?{HI)UH#Hq9cMsPzly}O`B{IslPyp zw5)aICDKAHjO*Z$)V;CxrDoGswB_DSYdV2g_A3P)ZhrRy&&tBqOe^e?!bK|!57~`4 z2+ZNnb^?JteWU5+l-NX-*zw3aV0OPxFbQKi-1_-Mm0(Y8f5k-QB{rcm$)7}fka42o z0ve-TpyQ-aF+i`jE_*u;&|;Oc&W=0?N}BXBQv9Ek%m>^PDgSm_+2)3PL2&skQ-@7I%YADBN*KWn$q06nzO(TWxMQg#Pk|Bh7+6 zZUX)rWE86d=5MJ+F+yQMha!2_^XyQZe%aVe-g{m=-u9WnpNjddF!TbwPIB>)X~ zH)t~sr)sK_${cdaAvJSPRi;uibI2i=9CA&ZW6r5^a!6HNmE@YrW%9kH7i>*XQsRm( z0vqpr?|=XM_xCs6dAD=ip>Jh3jkaOyu2IicPqXf^k?q))Yt^h~w%R>9GVE;4YIV$} zVdt{h_5JMLekEI6->$rfsgBjPYsPA}VOfo)v0Q6f-THD}cXh|L4ZXE|awqhcW*cI> zljAE8we^vj3;Ti)wT=&5aAKtl3RBP&vlMS98c$oABW$~}m ztv1bC)^T+g|9#tZG_!5GrrtDv9~-=vJ<^+w0i40HN8NVKHLZ4*P1tYOjN30~1tuH& z?T!V8+{=2@l^Bn}pTq68YuIhQdAM#kHQVgCmR-Wo)zyaK`kZA?Zoe#-WpL(E_O_sL zb#;Kqds)}+8sXKmS=(^CcKa@;n*p5ppALucF5fW^H%y~hFBr%AiD}uZtHG`UkWo`T zrj9?$XUBRMq698J!PJTgX>j#cXZT!x0bdT(%(@%XP^L`TYz1-@D#^#Q^o+CTM=& z)@w}z+&sdTlq)oIY&kAdlXNT_yFFW&_$nV)=4i5G*={o5_-pow4*9(SNB zpILT2J?TA;DK{y_c2w0JL&K~Svu30d-q&%ZN>^%DyKQhy&~(?e&1%;*ob*(7;&yUn zEjOAsxgOecYd%cgM=7>l`&9V>Em?eZbl)Q>*z z{&RZzLw`Ef|9On&c2Av8o6kba(gRvH1*!ZhKdIa&3hk7sSaRieq8Q3)@}*lnqoopb zzX2=rY)Bnp5b)SD2q8nD{sE=RpEk>|5QhCM7YuKl9s(O=dlzAw?b^=?s-SKqx#B@*9U&iS94a@#ax9er+ zxYC8?W7dV+KQ>^LPKFhbS>Zmz%*=2?xfYU*x;JQY>p3Mu$&PKFAmq}RkuXBv6|T`0 zy^A2Mjqrs#QmtjU$5vham{JcrwUS}jX1gJbmhuKooOEiED~B(^H~e@0MS6k7YcSeU z*x;(193Cz287{oRV@Cl$oo=-aeg?FwUnL-Lf+~*#R$GDb>GeJnSTqR}$%tnTj6)<> zGM;32WL%W%z%@N-CkIE{bGwS`7*>N-=u_L+mdt3Qo> zo&O2F5{jloB;iZv!09Rbkfle6M4aU>s+T^yAa{(KTc5Mz=8&T)9Q1tPkmmC5++XZxGIySOLYY6 zW?R@Oyb0%Qibgh!X$* zO#L!O3%x!X79RPi30uwWxF4ZUDmQ2$_yUoau(UHm-CrO@epxeY*F0i|J`}o7D&L~3 zg9A7U3*;pVTSC{u2);#|RM-+dU-H@Pbi{0R-wQwefP>TAGbix2qX3!vkbr+UOG|+Q zmSh6+|H*v}P(Q9NtkHtZXCQ$rZ%Yf){c@DH^(0G(3GPv{QFAm8fyD&LmG4F&1OXDJ z=V`vhVp<>Ihy&b?0tg4efY_u|)ogsqq9-4v!BHZ!vc8B5KtF&z^&?jw>X<`CTA+b= z7hvy`!nVbd7o=kzdrS@%=^Oi_S723<-tl0N!yy{f%#LsJnJY;D9n<0D%J-t!#yqB3 z8yZh;#gvaJeIx=(WVgq?=zlNJ-;P3$ibernqRaihiWB~&fL@M*9^(79Vi&c>=lbyh zH5%WK2i{lO4;bIznRobSg;|=Gf>2nXId25xgZkGTRL=yh4jqP&9GtZZW944CbE*m3{vqF>M`(|P*lr7T@ov>l0riLgpz{p3LDNA zM3DybxKmNy^G%G{jDxV7#lw;M9p(e@C11+5W22?BO*{OPT;V>=TcRk#*Yy@Sd?`wz zLKMTJ$PFCSt1Tx)u~^2zI%85SC{+Juh7_?tnOB)1Sg85{c+qUvn%%mgSydh$@*N~s z#v#?CZPEC=7lL`Ri$G*4-O@j2>Rs#FHj4mi^_qsd_hUy&(Rb)(--xPSdkpu`l*5=W zPrzO%b=&G_P2Fw;I}#4$-Sc@LW=(D#KsyX)UoZwHPp8YG6yLXia1Z$lE>PxG{k|o3 zXtrrJw3dlmgtTxNk@j=&OmjO{W0y^bf%}M-s?ZPU5d-b$HY|Ty_>TJ*q_)6ufL-D! zuyqQh`gxSOOv>Q4GDI^TQJFuPV08sXlaHl*K^dtothB~RWsYCdYc&=I3uFA?>FAa9 zR8-io>;};D92|%GDP8tgteY@ZC{miJ(F!5{;3=1ttE~sXThC?EbXA;NKRKDhLsAB( zC@<1wtKGz*a^`qc%8Dq9gX1jB)$Q7`d4d8f+fOhkC`%Mj)A9EzxLW`%J=&rj>+L$0 zY82)Wk3$V*#RSEjR1i}9Z~B9$w*HT3F`#s)2iWQfs(QUZWE>RW3J$1`!dw~Q4K`>A z{z(=eVXxqcJdY3=3IJDl z8SW=8gp#F{ZFF!cDN<#pX}R*A2BqToSNQ}h(2HwJJ|eiSi7V$i5gw1Ie-WcaKi>U6 z6m*_Y_Jlbi@EI27umC85D&~Su=ukO-ho*alJCfHvmXz&}Lwpz^+N(6xBhQgFc^_Yh z^InL0AtE5RSA@qSS4!}oP0$s8i5>x78zsQwkt>J;$Z+|+2*@*wbV`(RZN2U2;%*UE z-QlJ0@`cbB zXi;E!Yj~MQWI3jXLiN`Zw8WqE=;XVjbn<*c1!({nu8-paJTqPVgf4}nY%diRRj0_b zV}LEWAT*XR(98l&He9ow77Do%rI3Swo0y4^^Aar$Kxd|Cl6~E$uKzGWb3I4(kghvC zY4i&)R@44Cp>Wo z7SK8+rS-~wy}S(o3Hd; zzA3b@x37hU;R+6SYx#!0qtrGsL*yp7MjcY6Xp^gZBb zpj{tsmr`-{=W)7>0yBErygMFQeqp^w?8aTxrQmgrSl)|EUlHB5s+?m9<@+mm(#6*+FRa>uVk;UVHk zcPY^_z>f5<#n4C%9nFPZhJhl{kI>Q7=@{+0h8n|Z`Zogfy(imgo+Ir82o<82>CzBZ zE4c2K=cvJ}aoNxOdyK9Li#EU|2C(!Mh4GD6Ryo%1l#&pGE=J z+QSj{oB8I?Y!jUxEvs&*e;cQzK{fe^ZiR1$G1Kcgl$Cu+>JxeC1G>uY()tz%{Pgce zoxw1x2dPJy>qgbP9vgxz49lBQ$Rp(%Hs%Ih4}CV1@*(FJakEuSD}cUfXILGPI7YwD$q- zVOj|BEt=xZN)B$I*v-ti-AZ@RVAe%nEDXAAldWsG4YN->>^h5Ie-W6)TjCO1v7g0a z%3V^>w(sHvfSQGC+*8pxHqTGxyw0)AzsBj(5T4*>_?nExWl{xi@MIT4VDA=P6@mBw zmN466W@tbm_D663`(v|y z#$iqBloGZsw2ZKFTaoUGX9WFtIbMk9e~MMwbR}d5LrVz@7@3xg*im2@hpg8^;uRDr zLhA|Zxbp;C^Nr@{P@2(DYR*1Mn@%lL!qeZuPrbwC5I~pIRKv#yI0So+@ zd_Jx5_LaK|7d@6pi(<3$Z*e8d2V&c|MaRpM0JWuQBF%(N^Lj z(UywN*XSPYVa~Kv+*|jZX@0G;{ji8OZS-%KEBmDqJZrBbou^q=2SNuozM4{ih*Hsm zQfZ&N=V|pGO?!;HMwcoF+nbxkgT8VSF!B#7`zT{=ufe0EJsckSL4F6dq<_K|c(*%i zI>MU+sL6=zj-}N+1l77-q}5zCu=+G!19b5AmAEBUa^9fv*sZ)v({;Q`YT~5^uV=-UxN5!=VBIpa=AdoR%S;Tx0(;wy!c)T{L{sz^9!KFhoBDhhYMAJAi zn$jLbzQHj7m)l`em0g-a;|PBR8Is2s5?Q4hgz;Wr=2Fzlp3E{X!6dl&`aGd}ixPq? zyqd97d|2G+)3*?pV#+KO?BHPk0Lu1P2}-WjYX~HH z<~m&)vGvUJlo?HC=1=3eEFOl;`kF-$#=4vO z&Lgr7hWmP4fP2gb-*JoN-AdJP&E*}g;C7@|%S)+RJA_sSPlG_J>4XpkPb14`ei*Ui zgg^`Er}OAy6+_{7y(j8zx;$(iZi*+czAOc@s-^lJS{k644RdN@*aVMp)DJ1u&nHm_ z6@7XkMCBIE^&A1SrwJ+1s9h8mX((9~5&vQBW10E8wml<8F z6#MYLDExcxQRBV5h86megk@x+J-?dJsoo8;luq?8google.cloud.datastream.v1.AvroFileFormat - */ -class AvroFileFormat extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php deleted file mode 100644 index b10e512e8005..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.datastream.v1.BackfillJob - */ -class BackfillJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Backfill job state. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Backfill job's triggering reason. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.Trigger trigger = 2; - */ - protected $trigger = 0; - /** - * Output only. Backfill job's start time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_start_time = null; - /** - * Output only. Backfill job's end time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_end_time = null; - /** - * Output only. Errors which caused the backfill job to fail. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Backfill job state. - * @type int $trigger - * Backfill job's triggering reason. - * @type \Google\Protobuf\Timestamp $last_start_time - * Output only. Backfill job's start time. - * @type \Google\Protobuf\Timestamp $last_end_time - * Output only. Backfill job's end time. - * @type array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. Errors which caused the backfill job to fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Backfill job state. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Backfill job state. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\BackfillJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Backfill job's triggering reason. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.Trigger trigger = 2; - * @return int - */ - public function getTrigger() - { - return $this->trigger; - } - - /** - * Backfill job's triggering reason. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob.Trigger trigger = 2; - * @param int $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\BackfillJob\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * Output only. Backfill job's start time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastStartTime() - { - return $this->last_start_time; - } - - public function hasLastStartTime() - { - return isset($this->last_start_time); - } - - public function clearLastStartTime() - { - unset($this->last_start_time); - } - - /** - * Output only. Backfill job's start time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_start_time = $var; - - return $this; - } - - /** - * Output only. Backfill job's end time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastEndTime() - { - return $this->last_end_time; - } - - public function hasLastEndTime() - { - return isset($this->last_end_time); - } - - public function clearLastEndTime() - { - unset($this->last_end_time); - } - - /** - * Output only. Backfill job's end time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_end_time = $var; - - return $this; - } - - /** - * Output only. Errors which caused the backfill job to fail. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. Errors which caused the backfill job to fail. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Error::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php deleted file mode 100644 index 63ca32bd1a86..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/State.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.datastream.v1.BackfillJob.State - */ -class State -{ - /** - * Default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Backfill job was never started for the stream object (stream has backfill - * strategy defined as manual or object was explicitly excluded from - * automatic backfill). - * - * Generated from protobuf enum NOT_STARTED = 1; - */ - const NOT_STARTED = 1; - /** - * Backfill job will start pending available resources. - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * Backfill job is running. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - /** - * Backfill job stopped (next job run will start from beginning). - * - * Generated from protobuf enum STOPPED = 4; - */ - const STOPPED = 4; - /** - * Backfill job failed (due to an error). - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * Backfill completed successfully. - * - * Generated from protobuf enum COMPLETED = 6; - */ - const COMPLETED = 6; - /** - * Backfill job failed since the table structure is currently unsupported - * for backfill. - * - * Generated from protobuf enum UNSUPPORTED = 7; - */ - const UNSUPPORTED = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NOT_STARTED => 'NOT_STARTED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - self::STOPPED => 'STOPPED', - self::FAILED => 'FAILED', - self::COMPLETED => 'COMPLETED', - self::UNSUPPORTED => 'UNSUPPORTED', - ]; - - 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(State::class, \Google\Cloud\Datastream\V1\BackfillJob_State::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php deleted file mode 100644 index 319f4397a85e..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BackfillJob/Trigger.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.datastream.v1.BackfillJob.Trigger - */ -class Trigger -{ - /** - * Default value. - * - * Generated from protobuf enum TRIGGER_UNSPECIFIED = 0; - */ - const TRIGGER_UNSPECIFIED = 0; - /** - * Object backfill job was triggered automatically according to the stream's - * backfill strategy. - * - * Generated from protobuf enum AUTOMATIC = 1; - */ - const AUTOMATIC = 1; - /** - * Object backfill job was triggered manually using the dedicated API. - * - * Generated from protobuf enum MANUAL = 2; - */ - const MANUAL = 2; - - private static $valueToName = [ - self::TRIGGER_UNSPECIFIED => 'TRIGGER_UNSPECIFIED', - self::AUTOMATIC => 'AUTOMATIC', - self::MANUAL => 'MANUAL', - ]; - - 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(Trigger::class, \Google\Cloud\Datastream\V1\BackfillJob_Trigger::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php deleted file mode 100644 index af848464cd9d..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.datastream.v1.BigQueryDestinationConfig - */ -class BigQueryDestinationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The guaranteed data freshness (in seconds) when querying tables created by - * the stream. Editing this field will only affect new tables created in the - * future, but existing tables will not be impacted. Lower values mean that - * queries will return fresher data, but may result in higher cost. - * - * Generated from protobuf field .google.protobuf.Duration data_freshness = 300; - */ - protected $data_freshness = null; - protected $dataset_config; - protected $write_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset $single_target_dataset - * Single destination dataset. - * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets $source_hierarchy_datasets - * Source hierarchy datasets. - * @type \Google\Protobuf\Duration $data_freshness - * The guaranteed data freshness (in seconds) when querying tables created by - * the stream. Editing this field will only affect new tables created in the - * future, but existing tables will not be impacted. Lower values mean that - * queries will return fresher data, but may result in higher cost. - * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge $merge - * The standard mode - * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly $append_only - * Append only mode - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Single destination dataset. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset single_target_dataset = 201; - * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset|null - */ - public function getSingleTargetDataset() - { - return $this->readOneof(201); - } - - public function hasSingleTargetDataset() - { - return $this->hasOneof(201); - } - - /** - * Single destination dataset. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset single_target_dataset = 201; - * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset $var - * @return $this - */ - public function setSingleTargetDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SingleTargetDataset::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Source hierarchy datasets. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets source_hierarchy_datasets = 202; - * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets|null - */ - public function getSourceHierarchyDatasets() - { - return $this->readOneof(202); - } - - public function hasSourceHierarchyDatasets() - { - return $this->hasOneof(202); - } - - /** - * Source hierarchy datasets. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets source_hierarchy_datasets = 202; - * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets $var - * @return $this - */ - public function setSourceHierarchyDatasets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets::class); - $this->writeOneof(202, $var); - - return $this; - } - - /** - * The guaranteed data freshness (in seconds) when querying tables created by - * the stream. Editing this field will only affect new tables created in the - * future, but existing tables will not be impacted. Lower values mean that - * queries will return fresher data, but may result in higher cost. - * - * Generated from protobuf field .google.protobuf.Duration data_freshness = 300; - * @return \Google\Protobuf\Duration|null - */ - public function getDataFreshness() - { - return $this->data_freshness; - } - - public function hasDataFreshness() - { - return isset($this->data_freshness); - } - - public function clearDataFreshness() - { - unset($this->data_freshness); - } - - /** - * The guaranteed data freshness (in seconds) when querying tables created by - * the stream. Editing this field will only affect new tables created in the - * future, but existing tables will not be impacted. Lower values mean that - * queries will return fresher data, but may result in higher cost. - * - * Generated from protobuf field .google.protobuf.Duration data_freshness = 300; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDataFreshness($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->data_freshness = $var; - - return $this; - } - - /** - * The standard mode - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.Merge merge = 301; - * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge|null - */ - public function getMerge() - { - return $this->readOneof(301); - } - - public function hasMerge() - { - return $this->hasOneof(301); - } - - /** - * The standard mode - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.Merge merge = 301; - * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge $var - * @return $this - */ - public function setMerge($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\Merge::class); - $this->writeOneof(301, $var); - - return $this; - } - - /** - * Append only mode - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly append_only = 302; - * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly|null - */ - public function getAppendOnly() - { - return $this->readOneof(302); - } - - public function hasAppendOnly() - { - return $this->hasOneof(302); - } - - /** - * Append only mode - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.AppendOnly append_only = 302; - * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly $var - * @return $this - */ - public function setAppendOnly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\AppendOnly::class); - $this->writeOneof(302, $var); - - return $this; - } - - /** - * @return string - */ - public function getDatasetConfig() - { - return $this->whichOneof("dataset_config"); - } - - /** - * @return string - */ - public function getWriteMode() - { - return $this->whichOneof("write_mode"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php deleted file mode 100644 index 3402469aa10e..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SingleTargetDataset.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.datastream.v1.BigQueryDestinationConfig.SingleTargetDataset - */ -class SingleTargetDataset extends \Google\Protobuf\Internal\Message -{ - /** - * The dataset ID of the target dataset. - * DatasetIds allowed characters: - * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. - * - * Generated from protobuf field string dataset_id = 1; - */ - protected $dataset_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset_id - * The dataset ID of the target dataset. - * DatasetIds allowed characters: - * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * The dataset ID of the target dataset. - * DatasetIds allowed characters: - * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. - * - * Generated from protobuf field string dataset_id = 1; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * The dataset ID of the target dataset. - * DatasetIds allowed characters: - * https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#datasetreference. - * - * Generated from protobuf field string dataset_id = 1; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SingleTargetDataset::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_SingleTargetDataset::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php deleted file mode 100644 index fbd540e1fc76..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets - */ -class SourceHierarchyDatasets extends \Google\Protobuf\Internal\Message -{ - /** - * The dataset template to use for dynamic dataset creation. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2; - */ - protected $dataset_template = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate $dataset_template - * The dataset template to use for dynamic dataset creation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * The dataset template to use for dynamic dataset creation. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2; - * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate|null - */ - public function getDatasetTemplate() - { - return $this->dataset_template; - } - - public function hasDatasetTemplate() - { - return isset($this->dataset_template); - } - - public function clearDatasetTemplate() - { - unset($this->dataset_template); - } - - /** - * The dataset template to use for dynamic dataset creation. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate dataset_template = 2; - * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate $var - * @return $this - */ - public function setDatasetTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig\SourceHierarchyDatasets\DatasetTemplate::class); - $this->dataset_template = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SourceHierarchyDatasets::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_SourceHierarchyDatasets::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php deleted file mode 100644 index e0cd51177152..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryDestinationConfig/SourceHierarchyDatasets/DatasetTemplate.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.datastream.v1.BigQueryDestinationConfig.SourceHierarchyDatasets.DatasetTemplate - */ -class DatasetTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $location = ''; - /** - * If supplied, every created dataset will have its name prefixed by the - * provided value. The prefix and name will be separated by an underscore. - * i.e. _. - * - * Generated from protobuf field string dataset_id_prefix = 2; - */ - protected $dataset_id_prefix = ''; - /** - * Describes the Cloud KMS encryption key that will be used to - * protect destination BigQuery table. The BigQuery Service Account - * associated with your project requires access to this encryption key. - * i.e. - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. - * See https://cloud.google.com/bigquery/docs/customer-managed-encryption - * for more information. - * - * Generated from protobuf field string kms_key_name = 3; - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * @type string $dataset_id_prefix - * If supplied, every created dataset will have its name prefixed by the - * provided value. The prefix and name will be separated by an underscore. - * i.e. _. - * @type string $kms_key_name - * Describes the Cloud KMS encryption key that will be used to - * protect destination BigQuery table. The BigQuery Service Account - * associated with your project requires access to this encryption key. - * i.e. - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. - * See https://cloud.google.com/bigquery/docs/customer-managed-encryption - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Required. The geographic location where the dataset should reside. See - * https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * If supplied, every created dataset will have its name prefixed by the - * provided value. The prefix and name will be separated by an underscore. - * i.e. _. - * - * Generated from protobuf field string dataset_id_prefix = 2; - * @return string - */ - public function getDatasetIdPrefix() - { - return $this->dataset_id_prefix; - } - - /** - * If supplied, every created dataset will have its name prefixed by the - * provided value. The prefix and name will be separated by an underscore. - * i.e. _. - * - * Generated from protobuf field string dataset_id_prefix = 2; - * @param string $var - * @return $this - */ - public function setDatasetIdPrefix($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id_prefix = $var; - - return $this; - } - - /** - * Describes the Cloud KMS encryption key that will be used to - * protect destination BigQuery table. The BigQuery Service Account - * associated with your project requires access to this encryption key. - * i.e. - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. - * See https://cloud.google.com/bigquery/docs/customer-managed-encryption - * for more information. - * - * Generated from protobuf field string kms_key_name = 3; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Describes the Cloud KMS encryption key that will be used to - * protect destination BigQuery table. The BigQuery Service Account - * associated with your project requires access to this encryption key. - * i.e. - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}. - * See https://cloud.google.com/bigquery/docs/customer-managed-encryption - * for more information. - * - * Generated from protobuf field string kms_key_name = 3; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatasetTemplate::class, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig_SourceHierarchyDatasets_DatasetTemplate::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php deleted file mode 100644 index 09c6d5d4b837..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/BigQueryProfile.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.datastream.v1.BigQueryProfile - */ -class BigQueryProfile extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php deleted file mode 100644 index 3fa2bf4f0db8..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ConnectionProfile.php +++ /dev/null @@ -1,539 +0,0 @@ -google.cloud.datastream.v1.ConnectionProfile - */ -class ConnectionProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - protected $profile; - protected $connectivity; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource's name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time of the resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time of the resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels. - * @type string $display_name - * Required. Display name. - * @type \Google\Cloud\Datastream\V1\OracleProfile $oracle_profile - * Oracle ConnectionProfile configuration. - * @type \Google\Cloud\Datastream\V1\GcsProfile $gcs_profile - * Cloud Storage ConnectionProfile configuration. - * @type \Google\Cloud\Datastream\V1\MysqlProfile $mysql_profile - * MySQL ConnectionProfile configuration. - * @type \Google\Cloud\Datastream\V1\BigQueryProfile $bigquery_profile - * BigQuery Connection Profile configuration. - * @type \Google\Cloud\Datastream\V1\PostgresqlProfile $postgresql_profile - * PostgreSQL Connection Profile configuration. - * @type \Google\Cloud\Datastream\V1\SqlServerProfile $sql_server_profile - * SQLServer Connection Profile configuration. - * @type \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity $static_service_ip_connectivity - * Static Service IP connectivity. - * @type \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity $forward_ssh_connectivity - * Forward SSH tunnel connectivity. - * @type \Google\Cloud\Datastream\V1\PrivateConnectivity $private_connectivity - * Private connectivity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Oracle ConnectionProfile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleProfile oracle_profile = 100; - * @return \Google\Cloud\Datastream\V1\OracleProfile|null - */ - public function getOracleProfile() - { - return $this->readOneof(100); - } - - public function hasOracleProfile() - { - return $this->hasOneof(100); - } - - /** - * Oracle ConnectionProfile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleProfile oracle_profile = 100; - * @param \Google\Cloud\Datastream\V1\OracleProfile $var - * @return $this - */ - public function setOracleProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleProfile::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Cloud Storage ConnectionProfile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.GcsProfile gcs_profile = 101; - * @return \Google\Cloud\Datastream\V1\GcsProfile|null - */ - public function getGcsProfile() - { - return $this->readOneof(101); - } - - public function hasGcsProfile() - { - return $this->hasOneof(101); - } - - /** - * Cloud Storage ConnectionProfile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.GcsProfile gcs_profile = 101; - * @param \Google\Cloud\Datastream\V1\GcsProfile $var - * @return $this - */ - public function setGcsProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\GcsProfile::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * MySQL ConnectionProfile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlProfile mysql_profile = 102; - * @return \Google\Cloud\Datastream\V1\MysqlProfile|null - */ - public function getMysqlProfile() - { - return $this->readOneof(102); - } - - public function hasMysqlProfile() - { - return $this->hasOneof(102); - } - - /** - * MySQL ConnectionProfile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlProfile mysql_profile = 102; - * @param \Google\Cloud\Datastream\V1\MysqlProfile $var - * @return $this - */ - public function setMysqlProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlProfile::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * BigQuery Connection Profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryProfile bigquery_profile = 103; - * @return \Google\Cloud\Datastream\V1\BigQueryProfile|null - */ - public function getBigqueryProfile() - { - return $this->readOneof(103); - } - - public function hasBigqueryProfile() - { - return $this->hasOneof(103); - } - - /** - * BigQuery Connection Profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryProfile bigquery_profile = 103; - * @param \Google\Cloud\Datastream\V1\BigQueryProfile $var - * @return $this - */ - public function setBigqueryProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryProfile::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * PostgreSQL Connection Profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlProfile postgresql_profile = 104; - * @return \Google\Cloud\Datastream\V1\PostgresqlProfile|null - */ - public function getPostgresqlProfile() - { - return $this->readOneof(104); - } - - public function hasPostgresqlProfile() - { - return $this->hasOneof(104); - } - - /** - * PostgreSQL Connection Profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlProfile postgresql_profile = 104; - * @param \Google\Cloud\Datastream\V1\PostgresqlProfile $var - * @return $this - */ - public function setPostgresqlProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlProfile::class); - $this->writeOneof(104, $var); - - return $this; - } - - /** - * SQLServer Connection Profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerProfile sql_server_profile = 105; - * @return \Google\Cloud\Datastream\V1\SqlServerProfile|null - */ - public function getSqlServerProfile() - { - return $this->readOneof(105); - } - - public function hasSqlServerProfile() - { - return $this->hasOneof(105); - } - - /** - * SQLServer Connection Profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerProfile sql_server_profile = 105; - * @param \Google\Cloud\Datastream\V1\SqlServerProfile $var - * @return $this - */ - public function setSqlServerProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerProfile::class); - $this->writeOneof(105, $var); - - return $this; - } - - /** - * Static Service IP connectivity. - * - * Generated from protobuf field .google.cloud.datastream.v1.StaticServiceIpConnectivity static_service_ip_connectivity = 200; - * @return \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity|null - */ - public function getStaticServiceIpConnectivity() - { - return $this->readOneof(200); - } - - public function hasStaticServiceIpConnectivity() - { - return $this->hasOneof(200); - } - - /** - * Static Service IP connectivity. - * - * Generated from protobuf field .google.cloud.datastream.v1.StaticServiceIpConnectivity static_service_ip_connectivity = 200; - * @param \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity $var - * @return $this - */ - public function setStaticServiceIpConnectivity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\StaticServiceIpConnectivity::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * Forward SSH tunnel connectivity. - * - * Generated from protobuf field .google.cloud.datastream.v1.ForwardSshTunnelConnectivity forward_ssh_connectivity = 201; - * @return \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity|null - */ - public function getForwardSshConnectivity() - { - return $this->readOneof(201); - } - - public function hasForwardSshConnectivity() - { - return $this->hasOneof(201); - } - - /** - * Forward SSH tunnel connectivity. - * - * Generated from protobuf field .google.cloud.datastream.v1.ForwardSshTunnelConnectivity forward_ssh_connectivity = 201; - * @param \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity $var - * @return $this - */ - public function setForwardSshConnectivity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ForwardSshTunnelConnectivity::class); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Private connectivity. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnectivity private_connectivity = 202; - * @return \Google\Cloud\Datastream\V1\PrivateConnectivity|null - */ - public function getPrivateConnectivity() - { - return $this->readOneof(202); - } - - public function hasPrivateConnectivity() - { - return $this->hasOneof(202); - } - - /** - * Private connectivity. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnectivity private_connectivity = 202; - * @param \Google\Cloud\Datastream\V1\PrivateConnectivity $var - * @return $this - */ - public function setPrivateConnectivity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PrivateConnectivity::class); - $this->writeOneof(202, $var); - - return $this; - } - - /** - * @return string - */ - public function getProfile() - { - return $this->whichOneof("profile"); - } - - /** - * @return string - */ - public function getConnectivity() - { - return $this->whichOneof("connectivity"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php deleted file mode 100644 index 340d9479b630..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateConnectionProfileRequest.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.datastream.v1.CreateConnectionProfileRequest - */ -class CreateConnectionProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of ConnectionProfiles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The connection profile identifier. - * - * Generated from protobuf field string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connection_profile_id = ''; - /** - * Required. The connection profile resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connection_profile = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Only validate the connection profile, but don't create any - * resources. The default is false. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. Create the connection profile without validating it. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $parent Required. The parent that owns the collection of ConnectionProfiles. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile Required. The connection profile resource to create. - * @param string $connectionProfileId Required. The connection profile identifier. - * - * @return \Google\Cloud\Datastream\V1\CreateConnectionProfileRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile, string $connectionProfileId): self - { - return (new self()) - ->setParent($parent) - ->setConnectionProfile($connectionProfile) - ->setConnectionProfileId($connectionProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of ConnectionProfiles. - * @type string $connection_profile_id - * Required. The connection profile identifier. - * @type \Google\Cloud\Datastream\V1\ConnectionProfile $connection_profile - * Required. The connection profile resource to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. Only validate the connection profile, but don't create any - * resources. The default is false. - * @type bool $force - * Optional. Create the connection profile without validating it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of ConnectionProfiles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of ConnectionProfiles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The connection profile identifier. - * - * Generated from protobuf field string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConnectionProfileId() - { - return $this->connection_profile_id; - } - - /** - * Required. The connection profile identifier. - * - * Generated from protobuf field string connection_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConnectionProfileId($var) - { - GPBUtil::checkString($var, True); - $this->connection_profile_id = $var; - - return $this; - } - - /** - * Required. The connection profile resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\ConnectionProfile|null - */ - public function getConnectionProfile() - { - return $this->connection_profile; - } - - public function hasConnectionProfile() - { - return isset($this->connection_profile); - } - - public function clearConnectionProfile() - { - unset($this->connection_profile); - } - - /** - * Required. The connection profile resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\ConnectionProfile $var - * @return $this - */ - public function setConnectionProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ConnectionProfile::class); - $this->connection_profile = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Only validate the connection profile, but don't create any - * resources. The default is false. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the connection profile, but don't create any - * resources. The default is false. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. Create the connection profile without validating it. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. Create the connection profile without validating it. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php deleted file mode 100644 index 6b6ffc8be9cd..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreatePrivateConnectionRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.datastream.v1.CreatePrivateConnectionRequest - */ -class CreatePrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of PrivateConnections. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The private connectivity identifier. - * - * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_connection_id = ''; - /** - * Required. The Private Connectivity resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $private_connection = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to true, will skip validations. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $parent Required. The parent that owns the collection of PrivateConnections. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Datastream\V1\PrivateConnection $privateConnection Required. The Private Connectivity resource to create. - * @param string $privateConnectionId Required. The private connectivity identifier. - * - * @return \Google\Cloud\Datastream\V1\CreatePrivateConnectionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Datastream\V1\PrivateConnection $privateConnection, string $privateConnectionId): self - { - return (new self()) - ->setParent($parent) - ->setPrivateConnection($privateConnection) - ->setPrivateConnectionId($privateConnectionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of PrivateConnections. - * @type string $private_connection_id - * Required. The private connectivity identifier. - * @type \Google\Cloud\Datastream\V1\PrivateConnection $private_connection - * Required. The Private Connectivity resource to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, will skip validations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of PrivateConnections. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of PrivateConnections. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The private connectivity identifier. - * - * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPrivateConnectionId() - { - return $this->private_connection_id; - } - - /** - * Required. The private connectivity identifier. - * - * Generated from protobuf field string private_connection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPrivateConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->private_connection_id = $var; - - return $this; - } - - /** - * Required. The Private Connectivity resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\PrivateConnection|null - */ - public function getPrivateConnection() - { - return $this->private_connection; - } - - public function hasPrivateConnection() - { - return isset($this->private_connection); - } - - public function clearPrivateConnection() - { - unset($this->private_connection); - } - - /** - * Required. The Private Connectivity resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection private_connection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\PrivateConnection $var - * @return $this - */ - public function setPrivateConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PrivateConnection::class); - $this->private_connection = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, will skip validations. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, will skip validations. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php deleted file mode 100644 index f30c9dc23530..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateRouteRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.datastream.v1.CreateRouteRequest - */ -class CreateRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of Routes. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Route identifier. - * - * Generated from protobuf field string route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $route_id = ''; - /** - * Required. The Route resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.Route route = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $route = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent that owns the collection of Routes. Please see - * {@see DatastreamClient::privateConnectionName()} for help formatting this field. - * @param \Google\Cloud\Datastream\V1\Route $route Required. The Route resource to create. - * @param string $routeId Required. The Route identifier. - * - * @return \Google\Cloud\Datastream\V1\CreateRouteRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Datastream\V1\Route $route, string $routeId): self - { - return (new self()) - ->setParent($parent) - ->setRoute($route) - ->setRouteId($routeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of Routes. - * @type string $route_id - * Required. The Route identifier. - * @type \Google\Cloud\Datastream\V1\Route $route - * Required. The Route resource to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of Routes. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of Routes. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Route identifier. - * - * Generated from protobuf field string route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRouteId() - { - return $this->route_id; - } - - /** - * Required. The Route identifier. - * - * Generated from protobuf field string route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRouteId($var) - { - GPBUtil::checkString($var, True); - $this->route_id = $var; - - return $this; - } - - /** - * Required. The Route resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.Route route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\Route|null - */ - public function getRoute() - { - return $this->route; - } - - public function hasRoute() - { - return isset($this->route); - } - - public function clearRoute() - { - unset($this->route); - } - - /** - * Required. The Route resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.Route route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\Route $var - * @return $this - */ - public function setRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Route::class); - $this->route = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php deleted file mode 100644 index 6ab1f24b812b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/CreateStreamRequest.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.datastream.v1.CreateStreamRequest - */ -class CreateStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of streams. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The stream identifier. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream_id = ''; - /** - * Required. The stream resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Only validate the stream, but don't create any resources. - * The default is false. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. Create the stream without validating it. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $parent Required. The parent that owns the collection of streams. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Datastream\V1\Stream $stream Required. The stream resource to create. - * @param string $streamId Required. The stream identifier. - * - * @return \Google\Cloud\Datastream\V1\CreateStreamRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Datastream\V1\Stream $stream, string $streamId): self - { - return (new self()) - ->setParent($parent) - ->setStream($stream) - ->setStreamId($streamId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of streams. - * @type string $stream_id - * Required. The stream identifier. - * @type \Google\Cloud\Datastream\V1\Stream $stream - * Required. The stream resource to create. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. Only validate the stream, but don't create any resources. - * The default is false. - * @type bool $force - * Optional. Create the stream without validating it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of streams. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of streams. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The stream identifier. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * Required. The stream identifier. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * Required. The stream resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\Stream|null - */ - public function getStream() - { - return $this->stream; - } - - public function hasStream() - { - return isset($this->stream); - } - - public function clearStream() - { - unset($this->stream); - } - - /** - * Required. The stream resource to create. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\Stream $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream::class); - $this->stream = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Only validate the stream, but don't create any resources. - * The default is false. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the stream, but don't create any resources. - * The default is false. - * - * Generated from protobuf field bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. Create the stream without validating it. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. Create the stream without validating it. - * - * Generated from protobuf field bool force = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php deleted file mode 100644 index 0ec48d4f8b77..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteConnectionProfileRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.datastream.v1.DeleteConnectionProfileRequest - */ -class DeleteConnectionProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the connection profile resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the connection profile resource to delete. Please see - * {@see DatastreamClient::connectionProfileName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\DeleteConnectionProfileRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the connection profile resource to delete. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the connection profile resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the connection profile resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php deleted file mode 100644 index 893eb109610f..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeletePrivateConnectionRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.datastream.v1.DeletePrivateConnectionRequest - */ -class DeletePrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the private connectivity configuration to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to true, any child routes that belong to this - * PrivateConnection will also be deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the private connectivity configuration to delete. Please see - * {@see DatastreamClient::privateConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\DeletePrivateConnectionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the private connectivity configuration to delete. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, any child routes that belong to this - * PrivateConnection will also be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the private connectivity configuration to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the private connectivity configuration to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, any child routes that belong to this - * PrivateConnection will also be deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any child routes that belong to this - * PrivateConnection will also be deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php deleted file mode 100644 index 5ea9034f2150..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteRouteRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.datastream.v1.DeleteRouteRequest - */ -class DeleteRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Route resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the Route resource to delete. Please see - * {@see DatastreamClient::routeName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\DeleteRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Route resource to delete. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Route resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Route resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php deleted file mode 100644 index f55b9262ee48..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DeleteStreamRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.datastream.v1.DeleteStreamRequest - */ -class DeleteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the stream resource to delete. Please see - * {@see DatastreamClient::streamName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\DeleteStreamRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the stream resource to delete. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the stream resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php deleted file mode 100644 index 226f5618ec7b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DestinationConfig.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.datastream.v1.DestinationConfig - */ -class DestinationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Destination connection profile resource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * - * Generated from protobuf field string destination_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $destination_connection_profile = ''; - protected $destination_stream_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $destination_connection_profile - * Required. Destination connection profile resource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * @type \Google\Cloud\Datastream\V1\GcsDestinationConfig $gcs_destination_config - * A configuration for how data should be loaded to Cloud Storage. - * @type \Google\Cloud\Datastream\V1\BigQueryDestinationConfig $bigquery_destination_config - * BigQuery destination configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Destination connection profile resource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * - * Generated from protobuf field string destination_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDestinationConnectionProfile() - { - return $this->destination_connection_profile; - } - - /** - * Required. Destination connection profile resource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * - * Generated from protobuf field string destination_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestinationConnectionProfile($var) - { - GPBUtil::checkString($var, True); - $this->destination_connection_profile = $var; - - return $this; - } - - /** - * A configuration for how data should be loaded to Cloud Storage. - * - * Generated from protobuf field .google.cloud.datastream.v1.GcsDestinationConfig gcs_destination_config = 100; - * @return \Google\Cloud\Datastream\V1\GcsDestinationConfig|null - */ - public function getGcsDestinationConfig() - { - return $this->readOneof(100); - } - - public function hasGcsDestinationConfig() - { - return $this->hasOneof(100); - } - - /** - * A configuration for how data should be loaded to Cloud Storage. - * - * Generated from protobuf field .google.cloud.datastream.v1.GcsDestinationConfig gcs_destination_config = 100; - * @param \Google\Cloud\Datastream\V1\GcsDestinationConfig $var - * @return $this - */ - public function setGcsDestinationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\GcsDestinationConfig::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * BigQuery destination configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig bigquery_destination_config = 101; - * @return \Google\Cloud\Datastream\V1\BigQueryDestinationConfig|null - */ - public function getBigqueryDestinationConfig() - { - return $this->readOneof(101); - } - - public function hasBigqueryDestinationConfig() - { - return $this->hasOneof(101); - } - - /** - * BigQuery destination configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.BigQueryDestinationConfig bigquery_destination_config = 101; - * @param \Google\Cloud\Datastream\V1\BigQueryDestinationConfig $var - * @return $this - */ - public function setBigqueryDestinationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BigQueryDestinationConfig::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getDestinationStreamConfig() - { - return $this->whichOneof("destination_stream_config"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php deleted file mode 100644 index 39bbb78566ce..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileRequest.php +++ /dev/null @@ -1,365 +0,0 @@ -google.cloud.datastream.v1.DiscoverConnectionProfileRequest - */ -class DiscoverConnectionProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the connection profile type. Must be in - * the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $target; - protected $hierarchy; - protected $data_object; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the connection profile type. Must be in - * the format `projects/*/locations/*`. - * @type \Google\Cloud\Datastream\V1\ConnectionProfile $connection_profile - * An ad-hoc connection profile configuration. - * @type string $connection_profile_name - * A reference to an existing connection profile. - * @type bool $full_hierarchy - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - * @type int $hierarchy_depth - * The number of hierarchy levels below the current level to be retrieved. - * @type \Google\Cloud\Datastream\V1\OracleRdbms $oracle_rdbms - * Oracle RDBMS to enrich with child data objects and metadata. - * @type \Google\Cloud\Datastream\V1\MysqlRdbms $mysql_rdbms - * MySQL RDBMS to enrich with child data objects and metadata. - * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_rdbms - * PostgreSQL RDBMS to enrich with child data objects and metadata. - * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_rdbms - * SQLServer RDBMS to enrich with child data objects and metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the connection profile type. Must be in - * the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the connection profile type. Must be in - * the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An ad-hoc connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 200; - * @return \Google\Cloud\Datastream\V1\ConnectionProfile|null - */ - public function getConnectionProfile() - { - return $this->readOneof(200); - } - - public function hasConnectionProfile() - { - return $this->hasOneof(200); - } - - /** - * An ad-hoc connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 200; - * @param \Google\Cloud\Datastream\V1\ConnectionProfile $var - * @return $this - */ - public function setConnectionProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ConnectionProfile::class); - $this->writeOneof(200, $var); - - return $this; - } - - /** - * A reference to an existing connection profile. - * - * Generated from protobuf field string connection_profile_name = 201; - * @return string - */ - public function getConnectionProfileName() - { - return $this->readOneof(201); - } - - public function hasConnectionProfileName() - { - return $this->hasOneof(201); - } - - /** - * A reference to an existing connection profile. - * - * Generated from protobuf field string connection_profile_name = 201; - * @param string $var - * @return $this - */ - public function setConnectionProfileName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(201, $var); - - return $this; - } - - /** - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - * - * Generated from protobuf field bool full_hierarchy = 3; - * @return bool - */ - public function getFullHierarchy() - { - return $this->readOneof(3); - } - - public function hasFullHierarchy() - { - return $this->hasOneof(3); - } - - /** - * Whether to retrieve the full hierarchy of data objects (TRUE) or only the - * current level (FALSE). - * - * Generated from protobuf field bool full_hierarchy = 3; - * @param bool $var - * @return $this - */ - public function setFullHierarchy($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The number of hierarchy levels below the current level to be retrieved. - * - * Generated from protobuf field int32 hierarchy_depth = 4; - * @return int - */ - public function getHierarchyDepth() - { - return $this->readOneof(4); - } - - public function hasHierarchyDepth() - { - return $this->hasOneof(4); - } - - /** - * The number of hierarchy levels below the current level to be retrieved. - * - * Generated from protobuf field int32 hierarchy_depth = 4; - * @param int $var - * @return $this - */ - public function setHierarchyDepth($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Oracle RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; - * @return \Google\Cloud\Datastream\V1\OracleRdbms|null - */ - public function getOracleRdbms() - { - return $this->readOneof(100); - } - - public function hasOracleRdbms() - { - return $this->hasOneof(100); - } - - /** - * Oracle RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; - * @param \Google\Cloud\Datastream\V1\OracleRdbms $var - * @return $this - */ - public function setOracleRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * MySQL RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; - * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null - */ - public function getMysqlRdbms() - { - return $this->readOneof(101); - } - - public function hasMysqlRdbms() - { - return $this->hasOneof(101); - } - - /** - * MySQL RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; - * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var - * @return $this - */ - public function setMysqlRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * PostgreSQL RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; - * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null - */ - public function getPostgresqlRdbms() - { - return $this->readOneof(102); - } - - public function hasPostgresqlRdbms() - { - return $this->hasOneof(102); - } - - /** - * PostgreSQL RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; - * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var - * @return $this - */ - public function setPostgresqlRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * SQLServer RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; - * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null - */ - public function getSqlServerRdbms() - { - return $this->readOneof(103); - } - - public function hasSqlServerRdbms() - { - return $this->hasOneof(103); - } - - /** - * SQLServer RDBMS to enrich with child data objects and metadata. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; - * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var - * @return $this - */ - public function setSqlServerRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - - /** - * @return string - */ - public function getHierarchy() - { - return $this->whichOneof("hierarchy"); - } - - /** - * @return string - */ - public function getDataObject() - { - return $this->whichOneof("data_object"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php deleted file mode 100644 index 22ea94898f57..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/DiscoverConnectionProfileResponse.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.datastream.v1.DiscoverConnectionProfileResponse - */ -class DiscoverConnectionProfileResponse extends \Google\Protobuf\Internal\Message -{ - protected $data_object; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\OracleRdbms $oracle_rdbms - * Enriched Oracle RDBMS object. - * @type \Google\Cloud\Datastream\V1\MysqlRdbms $mysql_rdbms - * Enriched MySQL RDBMS object. - * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_rdbms - * Enriched PostgreSQL RDBMS object. - * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_rdbms - * Enriched SQLServer RDBMS object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Enriched Oracle RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; - * @return \Google\Cloud\Datastream\V1\OracleRdbms|null - */ - public function getOracleRdbms() - { - return $this->readOneof(100); - } - - public function hasOracleRdbms() - { - return $this->hasOneof(100); - } - - /** - * Enriched Oracle RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_rdbms = 100; - * @param \Google\Cloud\Datastream\V1\OracleRdbms $var - * @return $this - */ - public function setOracleRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Enriched MySQL RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; - * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null - */ - public function getMysqlRdbms() - { - return $this->readOneof(101); - } - - public function hasMysqlRdbms() - { - return $this->hasOneof(101); - } - - /** - * Enriched MySQL RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_rdbms = 101; - * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var - * @return $this - */ - public function setMysqlRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Enriched PostgreSQL RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; - * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null - */ - public function getPostgresqlRdbms() - { - return $this->readOneof(102); - } - - public function hasPostgresqlRdbms() - { - return $this->hasOneof(102); - } - - /** - * Enriched PostgreSQL RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_rdbms = 102; - * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var - * @return $this - */ - public function setPostgresqlRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Enriched SQLServer RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; - * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null - */ - public function getSqlServerRdbms() - { - return $this->readOneof(103); - } - - public function hasSqlServerRdbms() - { - return $this->hasOneof(103); - } - - /** - * Enriched SQLServer RDBMS object. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_rdbms = 103; - * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var - * @return $this - */ - public function setSqlServerRdbms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * @return string - */ - public function getDataObject() - { - return $this->whichOneof("data_object"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php deleted file mode 100644 index 6b8bb673c8ba..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Error.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.datastream.v1.Error - */ -class Error extends \Google\Protobuf\Internal\Message -{ - /** - * A title that explains the reason for the error. - * - * Generated from protobuf field string reason = 1; - */ - protected $reason = ''; - /** - * A unique identifier for this specific error, - * allowing it to be traced throughout the system in logs and API responses. - * - * Generated from protobuf field string error_uuid = 2; - */ - protected $error_uuid = ''; - /** - * A message containing more information about the error that occurred. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - /** - * The time when the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 4; - */ - protected $error_time = null; - /** - * Additional information about the error. - * - * Generated from protobuf field map details = 5; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $reason - * A title that explains the reason for the error. - * @type string $error_uuid - * A unique identifier for this specific error, - * allowing it to be traced throughout the system in logs and API responses. - * @type string $message - * A message containing more information about the error that occurred. - * @type \Google\Protobuf\Timestamp $error_time - * The time when the error occurred. - * @type array|\Google\Protobuf\Internal\MapField $details - * Additional information about the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * A title that explains the reason for the error. - * - * Generated from protobuf field string reason = 1; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * A title that explains the reason for the error. - * - * Generated from protobuf field string reason = 1; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - - /** - * A unique identifier for this specific error, - * allowing it to be traced throughout the system in logs and API responses. - * - * Generated from protobuf field string error_uuid = 2; - * @return string - */ - public function getErrorUuid() - { - return $this->error_uuid; - } - - /** - * A unique identifier for this specific error, - * allowing it to be traced throughout the system in logs and API responses. - * - * Generated from protobuf field string error_uuid = 2; - * @param string $var - * @return $this - */ - public function setErrorUuid($var) - { - GPBUtil::checkString($var, True); - $this->error_uuid = $var; - - return $this; - } - - /** - * A message containing more information about the error that occurred. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * A message containing more information about the error that occurred. - * - * 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; - } - - /** - * The time when the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getErrorTime() - { - return $this->error_time; - } - - public function hasErrorTime() - { - return isset($this->error_time); - } - - public function clearErrorTime() - { - unset($this->error_time); - } - - /** - * The time when the error occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp error_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setErrorTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->error_time = $var; - - return $this; - } - - /** - * Additional information about the error. - * - * Generated from protobuf field map details = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDetails() - { - return $this->details; - } - - /** - * Additional information about the error. - * - * Generated from protobuf field map details = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php deleted file mode 100644 index 5f2076e6af4b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.datastream.v1.FetchStaticIpsRequest - */ -class FetchStaticIpsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Maximum number of Ips to return, will likely not be specified. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/*/locations/*`. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\FetchStaticIpsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of Ips to return, will likely not be specified. - * @type string $page_token - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the location for which static IPs should be - * returned. Must be in the format `projects/*/locations/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Maximum number of Ips to return, will likely not be specified. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Ips to return, will likely not be specified. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListStaticIps` call. - * will likely not be specified. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php deleted file mode 100644 index 880a9a3350a6..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/FetchStaticIpsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.datastream.v1.FetchStaticIpsResponse - */ -class FetchStaticIpsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * list of static ips by account - * - * Generated from protobuf field repeated string static_ips = 1; - */ - private $static_ips; - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $static_ips - * list of static ips by account - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * list of static ips by account - * - * Generated from protobuf field repeated string static_ips = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStaticIps() - { - return $this->static_ips; - } - - /** - * list of static ips by account - * - * Generated from protobuf field repeated string static_ips = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStaticIps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->static_ips = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php deleted file mode 100644 index 7a04f3dee960..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ForwardSshTunnelConnectivity.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.datastream.v1.ForwardSshTunnelConnectivity - */ -class ForwardSshTunnelConnectivity extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Hostname for the SSH tunnel. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Required. Username for the SSH tunnel. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Port for the SSH tunnel, default value is 22. - * - * Generated from protobuf field int32 port = 3; - */ - protected $port = 0; - protected $authentication_method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hostname - * Required. Hostname for the SSH tunnel. - * @type string $username - * Required. Username for the SSH tunnel. - * @type int $port - * Port for the SSH tunnel, default value is 22. - * @type string $password - * Input only. SSH password. - * @type string $private_key - * Input only. SSH private key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Hostname for the SSH tunnel. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. Hostname for the SSH tunnel. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Required. Username for the SSH tunnel. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. Username for the SSH tunnel. - * - * Generated from protobuf field string username = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Port for the SSH tunnel, default value is 22. - * - * Generated from protobuf field int32 port = 3; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Port for the SSH tunnel, default value is 22. - * - * Generated from protobuf field int32 port = 3; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Input only. SSH password. - * - * Generated from protobuf field string password = 100 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPassword() - { - return $this->readOneof(100); - } - - public function hasPassword() - { - return $this->hasOneof(100); - } - - /** - * Input only. SSH password. - * - * Generated from protobuf field string password = 100 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Input only. SSH private key. - * - * Generated from protobuf field string private_key = 101 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPrivateKey() - { - return $this->readOneof(101); - } - - public function hasPrivateKey() - { - return $this->hasOneof(101); - } - - /** - * Input only. SSH private key. - * - * Generated from protobuf field string private_key = 101 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateKey($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthenticationMethod() - { - return $this->whichOneof("authentication_method"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php deleted file mode 100644 index c302c34150e4..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsDestinationConfig.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.datastream.v1.GcsDestinationConfig - */ -class GcsDestinationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Path inside the Cloud Storage bucket to write data to. - * - * Generated from protobuf field string path = 1; - */ - protected $path = ''; - /** - * The maximum file size to be saved in the bucket. - * - * Generated from protobuf field int32 file_rotation_mb = 2; - */ - protected $file_rotation_mb = 0; - /** - * The maximum duration for which new events are added before a file is - * closed and a new file is created. Values within the range of 15-60 seconds - * are allowed. - * - * Generated from protobuf field .google.protobuf.Duration file_rotation_interval = 3; - */ - protected $file_rotation_interval = null; - protected $file_format; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Path inside the Cloud Storage bucket to write data to. - * @type int $file_rotation_mb - * The maximum file size to be saved in the bucket. - * @type \Google\Protobuf\Duration $file_rotation_interval - * The maximum duration for which new events are added before a file is - * closed and a new file is created. Values within the range of 15-60 seconds - * are allowed. - * @type \Google\Cloud\Datastream\V1\AvroFileFormat $avro_file_format - * AVRO file format configuration. - * @type \Google\Cloud\Datastream\V1\JsonFileFormat $json_file_format - * JSON file format configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Path inside the Cloud Storage bucket to write data to. - * - * Generated from protobuf field string path = 1; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Path inside the Cloud Storage bucket to write data to. - * - * Generated from protobuf field string path = 1; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * The maximum file size to be saved in the bucket. - * - * Generated from protobuf field int32 file_rotation_mb = 2; - * @return int - */ - public function getFileRotationMb() - { - return $this->file_rotation_mb; - } - - /** - * The maximum file size to be saved in the bucket. - * - * Generated from protobuf field int32 file_rotation_mb = 2; - * @param int $var - * @return $this - */ - public function setFileRotationMb($var) - { - GPBUtil::checkInt32($var); - $this->file_rotation_mb = $var; - - return $this; - } - - /** - * The maximum duration for which new events are added before a file is - * closed and a new file is created. Values within the range of 15-60 seconds - * are allowed. - * - * Generated from protobuf field .google.protobuf.Duration file_rotation_interval = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getFileRotationInterval() - { - return $this->file_rotation_interval; - } - - public function hasFileRotationInterval() - { - return isset($this->file_rotation_interval); - } - - public function clearFileRotationInterval() - { - unset($this->file_rotation_interval); - } - - /** - * The maximum duration for which new events are added before a file is - * closed and a new file is created. Values within the range of 15-60 seconds - * are allowed. - * - * Generated from protobuf field .google.protobuf.Duration file_rotation_interval = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFileRotationInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->file_rotation_interval = $var; - - return $this; - } - - /** - * AVRO file format configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100; - * @return \Google\Cloud\Datastream\V1\AvroFileFormat|null - */ - public function getAvroFileFormat() - { - return $this->readOneof(100); - } - - public function hasAvroFileFormat() - { - return $this->hasOneof(100); - } - - /** - * AVRO file format configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.AvroFileFormat avro_file_format = 100; - * @param \Google\Cloud\Datastream\V1\AvroFileFormat $var - * @return $this - */ - public function setAvroFileFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\AvroFileFormat::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * JSON file format configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101; - * @return \Google\Cloud\Datastream\V1\JsonFileFormat|null - */ - public function getJsonFileFormat() - { - return $this->readOneof(101); - } - - public function hasJsonFileFormat() - { - return $this->hasOneof(101); - } - - /** - * JSON file format configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat json_file_format = 101; - * @param \Google\Cloud\Datastream\V1\JsonFileFormat $var - * @return $this - */ - public function setJsonFileFormat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\JsonFileFormat::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * @return string - */ - public function getFileFormat() - { - return $this->whichOneof("file_format"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php deleted file mode 100644 index 2b2d378ccb90..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GcsProfile.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.datastream.v1.GcsProfile - */ -class GcsProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cloud Storage bucket name. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = ''; - /** - * The root path inside the Cloud Storage bucket. - * - * Generated from protobuf field string root_path = 2; - */ - protected $root_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Required. The Cloud Storage bucket name. - * @type string $root_path - * The root path inside the Cloud Storage bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cloud Storage bucket name. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Required. The Cloud Storage bucket name. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * The root path inside the Cloud Storage bucket. - * - * Generated from protobuf field string root_path = 2; - * @return string - */ - public function getRootPath() - { - return $this->root_path; - } - - /** - * The root path inside the Cloud Storage bucket. - * - * Generated from protobuf field string root_path = 2; - * @param string $var - * @return $this - */ - public function setRootPath($var) - { - GPBUtil::checkString($var, True); - $this->root_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php deleted file mode 100644 index e713c9a456e4..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetConnectionProfileRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.datastream.v1.GetConnectionProfileRequest - */ -class GetConnectionProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the connection profile resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the connection profile resource to get. Please see - * {@see DatastreamClient::connectionProfileName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\GetConnectionProfileRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the connection profile resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the connection profile resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the connection profile resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php deleted file mode 100644 index ab9cb8ef07e9..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetPrivateConnectionRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.datastream.v1.GetPrivateConnectionRequest - */ -class GetPrivateConnectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the private connectivity configuration to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the private connectivity configuration to get. Please see - * {@see DatastreamClient::privateConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\GetPrivateConnectionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the private connectivity configuration to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the private connectivity configuration to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the private connectivity configuration to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php deleted file mode 100644 index 4f4824fea95d..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetRouteRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.datastream.v1.GetRouteRequest - */ -class GetRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Route resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Route resource to get. Please see - * {@see DatastreamClient::routeName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\GetRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Route resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Route resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Route resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php deleted file mode 100644 index 717131637c8e..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamObjectRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.datastream.v1.GetStreamObjectRequest - */ -class GetStreamObjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream object resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the stream object resource to get. Please see - * {@see DatastreamClient::streamObjectName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\GetStreamObjectRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the stream object resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream object resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the stream object resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php deleted file mode 100644 index e76d92f218bc..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/GetStreamRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.datastream.v1.GetStreamRequest - */ -class GetStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the stream resource to get. Please see - * {@see DatastreamClient::streamName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\GetStreamRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the stream resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the stream resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php deleted file mode 100644 index f397759430a8..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.datastream.v1.JsonFileFormat - */ -class JsonFileFormat extends \Google\Protobuf\Internal\Message -{ - /** - * The schema file format along JSON data files. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1; - */ - protected $schema_file_format = 0; - /** - * Compression of the loaded JSON file. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2; - */ - protected $compression = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $schema_file_format - * The schema file format along JSON data files. - * @type int $compression - * Compression of the loaded JSON file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * The schema file format along JSON data files. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1; - * @return int - */ - public function getSchemaFileFormat() - { - return $this->schema_file_format; - } - - /** - * The schema file format along JSON data files. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat schema_file_format = 1; - * @param int $var - * @return $this - */ - public function setSchemaFileFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\JsonFileFormat\SchemaFileFormat::class); - $this->schema_file_format = $var; - - return $this; - } - - /** - * Compression of the loaded JSON file. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2; - * @return int - */ - public function getCompression() - { - return $this->compression; - } - - /** - * Compression of the loaded JSON file. - * - * Generated from protobuf field .google.cloud.datastream.v1.JsonFileFormat.JsonCompression compression = 2; - * @param int $var - * @return $this - */ - public function setCompression($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\JsonFileFormat\JsonCompression::class); - $this->compression = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php deleted file mode 100644 index 3c398cc351cf..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/JsonCompression.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datastream.v1.JsonFileFormat.JsonCompression - */ -class JsonCompression -{ - /** - * Unspecified json file compression. - * - * Generated from protobuf enum JSON_COMPRESSION_UNSPECIFIED = 0; - */ - const JSON_COMPRESSION_UNSPECIFIED = 0; - /** - * Do not compress JSON file. - * - * Generated from protobuf enum NO_COMPRESSION = 1; - */ - const NO_COMPRESSION = 1; - /** - * Gzip compression. - * - * Generated from protobuf enum GZIP = 2; - */ - const GZIP = 2; - - private static $valueToName = [ - self::JSON_COMPRESSION_UNSPECIFIED => 'JSON_COMPRESSION_UNSPECIFIED', - self::NO_COMPRESSION => 'NO_COMPRESSION', - self::GZIP => 'GZIP', - ]; - - 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(JsonCompression::class, \Google\Cloud\Datastream\V1\JsonFileFormat_JsonCompression::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php deleted file mode 100644 index ab8cd7bcf87c..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/JsonFileFormat/SchemaFileFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datastream.v1.JsonFileFormat.SchemaFileFormat - */ -class SchemaFileFormat -{ - /** - * Unspecified schema file format. - * - * Generated from protobuf enum SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; - */ - const SCHEMA_FILE_FORMAT_UNSPECIFIED = 0; - /** - * Do not attach schema file. - * - * Generated from protobuf enum NO_SCHEMA_FILE = 1; - */ - const NO_SCHEMA_FILE = 1; - /** - * Avro schema format. - * - * Generated from protobuf enum AVRO_SCHEMA_FILE = 2; - */ - const AVRO_SCHEMA_FILE = 2; - - private static $valueToName = [ - self::SCHEMA_FILE_FORMAT_UNSPECIFIED => 'SCHEMA_FILE_FORMAT_UNSPECIFIED', - self::NO_SCHEMA_FILE => 'NO_SCHEMA_FILE', - self::AVRO_SCHEMA_FILE => 'AVRO_SCHEMA_FILE', - ]; - - 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(SchemaFileFormat::class, \Google\Cloud\Datastream\V1\JsonFileFormat_SchemaFileFormat::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php deleted file mode 100644 index 42fa4221565e..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.datastream.v1.ListConnectionProfilesRequest - */ -class ListConnectionProfilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of connection profiles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent that owns the collection of connection profiles. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\ListConnectionProfilesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of connection profiles. - * @type int $page_size - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * @type string $filter - * Filter request. - * @type string $order_by - * Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of connection profiles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of connection profiles. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of connection profiles to return. - * If unspecified, at most 50 connection profiles will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token received from a previous `ListConnectionProfiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConnectionProfiles` - * must match the call that provided the page token. - * - * 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; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php deleted file mode 100644 index 9d6b44dff3d9..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListConnectionProfilesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.datastream.v1.ListConnectionProfilesResponse - */ -class ListConnectionProfilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of connection profiles. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.ConnectionProfile connection_profiles = 1; - */ - private $connection_profiles; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\ConnectionProfile>|\Google\Protobuf\Internal\RepeatedField $connection_profiles - * List of connection profiles. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * List of connection profiles. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.ConnectionProfile connection_profiles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConnectionProfiles() - { - return $this->connection_profiles; - } - - /** - * List of connection profiles. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.ConnectionProfile connection_profiles = 1; - * @param array<\Google\Cloud\Datastream\V1\ConnectionProfile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConnectionProfiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\ConnectionProfile::class); - $this->connection_profiles = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php deleted file mode 100644 index 577bb1a4674e..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsRequest.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.datastream.v1.ListPrivateConnectionsRequest - */ -class ListPrivateConnectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of private connectivity - * configurations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent that owns the collection of private connectivity - * configurations. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\ListPrivateConnectionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of private connectivity - * configurations. - * @type int $page_size - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * @type string $filter - * Filter request. - * @type string $order_by - * Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of private connectivity - * configurations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of private connectivity - * configurations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of private connectivity configurations to return. - * If unspecified, at most 50 private connectivity configurations that will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token received from a previous `ListPrivateConnections` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListPrivateConnections` must match the call that provided the page - * token. - * - * 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; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php deleted file mode 100644 index 73da1daeade2..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListPrivateConnectionsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.datastream.v1.ListPrivateConnectionsResponse - */ -class ListPrivateConnectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of private connectivity configurations. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PrivateConnection private_connections = 1; - */ - private $private_connections; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $private_connections - * List of private connectivity configurations. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * List of private connectivity configurations. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PrivateConnection private_connections = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrivateConnections() - { - return $this->private_connections; - } - - /** - * List of private connectivity configurations. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PrivateConnection private_connections = 1; - * @param array<\Google\Cloud\Datastream\V1\PrivateConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrivateConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PrivateConnection::class); - $this->private_connections = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php deleted file mode 100644 index e33432d55579..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesRequest.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.datastream.v1.ListRoutesRequest - */ -class ListRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of Routess. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent that owns the collection of Routess. Please see - * {@see DatastreamClient::privateConnectionName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\ListRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of Routess. - * @type int $page_size - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * @type string $page_token - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * @type string $filter - * Filter request. - * @type string $order_by - * Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of Routess. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of Routess. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Routes to return. The service may return - * fewer than this value. If unspecified, at most 50 Routes - * will be returned. The maximum value is 1000; values above 1000 will be - * coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token received from a previous `ListRoutes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListRoutes` must match the call that provided the page - * token. - * - * 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; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php deleted file mode 100644 index 627b34ee9e4e..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListRoutesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.datastream.v1.ListRoutesResponse - */ -class ListRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Routes. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Route routes = 1; - */ - private $routes; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\Route>|\Google\Protobuf\Internal\RepeatedField $routes - * List of Routes. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * List of Routes. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Route routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * List of Routes. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Route routes = 1; - * @param array<\Google\Cloud\Datastream\V1\Route>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Route::class); - $this->routes = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php deleted file mode 100644 index 0a10310b2c6f..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.datastream.v1.ListStreamObjectsRequest - */ -class ListStreamObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent stream that owns the collection of objects. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent stream that owns the collection of objects. Please see - * {@see DatastreamClient::streamName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\ListStreamObjectsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent stream that owns the collection of objects. - * @type int $page_size - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent stream that owns the collection of objects. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent stream that owns the collection of objects. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of objects to return. Default is 50. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token received from a previous `ListStreamObjectsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListStreamObjectsRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php deleted file mode 100644 index a4fe04856abe..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamObjectsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.datastream.v1.ListStreamObjectsResponse - */ -class ListStreamObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of stream objects. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.StreamObject stream_objects = 1; - */ - private $stream_objects; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\StreamObject>|\Google\Protobuf\Internal\RepeatedField $stream_objects - * List of stream objects. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * List of stream objects. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.StreamObject stream_objects = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStreamObjects() - { - return $this->stream_objects; - } - - /** - * List of stream objects. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.StreamObject stream_objects = 1; - * @param array<\Google\Cloud\Datastream\V1\StreamObject>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStreamObjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\StreamObject::class); - $this->stream_objects = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php deleted file mode 100644 index 73c1f5270403..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.datastream.v1.ListStreamsRequest - */ -class ListStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent that owns the collection of streams. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent that owns the collection of streams. Please see - * {@see DatastreamClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\ListStreamsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent that owns the collection of streams. - * @type int $page_size - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * @type string $filter - * Filter request. - * @type string $order_by - * Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent that owns the collection of streams. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent that owns the collection of streams. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of streams to return. - * If unspecified, at most 50 streams will be returned. The maximum - * value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token received from a previous `ListStreams` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListStreams` - * must match the call that provided the page token. - * - * 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; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter request. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Order by fields for the result. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php deleted file mode 100644 index c4b245e8d607..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ListStreamsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.datastream.v1.ListStreamsResponse - */ -class ListStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of streams - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Stream streams = 1; - */ - private $streams; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\Stream>|\Google\Protobuf\Internal\RepeatedField $streams - * List of streams - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * List of streams - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Stream streams = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStreams() - { - return $this->streams; - } - - /** - * List of streams - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Stream streams = 1; - * @param array<\Google\Cloud\Datastream\V1\Stream>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Stream::class); - $this->streams = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php deleted file mode 100644 index 5863ccd43c02..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/LookupStreamObjectRequest.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.datastream.v1.LookupStreamObjectRequest - */ -class LookupStreamObjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent stream that owns the collection of objects. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The source object identifier which maps to the stream object. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_object_identifier = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent stream that owns the collection of objects. - * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier $source_object_identifier - * Required. The source object identifier which maps to the stream object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent stream that owns the collection of objects. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent stream that owns the collection of objects. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The source object identifier which maps to the stream object. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier|null - */ - public function getSourceObjectIdentifier() - { - return $this->source_object_identifier; - } - - public function hasSourceObjectIdentifier() - { - return isset($this->source_object_identifier); - } - - public function clearSourceObjectIdentifier() - { - unset($this->source_object_identifier); - } - - /** - * Required. The source object identifier which maps to the stream object. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object_identifier = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier $var - * @return $this - */ - public function setSourceObjectIdentifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier::class); - $this->source_object_identifier = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php deleted file mode 100644 index 558dc222effe..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlColumn.php +++ /dev/null @@ -1,343 +0,0 @@ -google.cloud.datastream.v1.MysqlColumn - */ -class MysqlColumn extends \Google\Protobuf\Internal\Message -{ - /** - * Column name. - * - * Generated from protobuf field string column = 1; - */ - protected $column = ''; - /** - * The MySQL data type. Full data types list can be found here: - * https://dev.mysql.com/doc/refman/8.0/en/data-types.html - * - * Generated from protobuf field string data_type = 2; - */ - protected $data_type = ''; - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - */ - protected $length = 0; - /** - * Column collation. - * - * Generated from protobuf field string collation = 4; - */ - protected $collation = ''; - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 5; - */ - protected $primary_key = false; - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 6; - */ - protected $nullable = false; - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 7; - */ - protected $ordinal_position = 0; - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 8; - */ - protected $precision = 0; - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 9; - */ - protected $scale = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $column - * Column name. - * @type string $data_type - * The MySQL data type. Full data types list can be found here: - * https://dev.mysql.com/doc/refman/8.0/en/data-types.html - * @type int $length - * Column length. - * @type string $collation - * Column collation. - * @type bool $primary_key - * Whether or not the column represents a primary key. - * @type bool $nullable - * Whether or not the column can accept a null value. - * @type int $ordinal_position - * The ordinal position of the column in the table. - * @type int $precision - * Column precision. - * @type int $scale - * Column scale. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Column name. - * - * Generated from protobuf field string column = 1; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Column name. - * - * Generated from protobuf field string column = 1; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * The MySQL data type. Full data types list can be found here: - * https://dev.mysql.com/doc/refman/8.0/en/data-types.html - * - * Generated from protobuf field string data_type = 2; - * @return string - */ - public function getDataType() - { - return $this->data_type; - } - - /** - * The MySQL data type. Full data types list can be found here: - * https://dev.mysql.com/doc/refman/8.0/en/data-types.html - * - * Generated from protobuf field string data_type = 2; - * @param string $var - * @return $this - */ - public function setDataType($var) - { - GPBUtil::checkString($var, True); - $this->data_type = $var; - - return $this; - } - - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - * @return int - */ - public function getLength() - { - return $this->length; - } - - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - * @param int $var - * @return $this - */ - public function setLength($var) - { - GPBUtil::checkInt32($var); - $this->length = $var; - - return $this; - } - - /** - * Column collation. - * - * Generated from protobuf field string collation = 4; - * @return string - */ - public function getCollation() - { - return $this->collation; - } - - /** - * Column collation. - * - * Generated from protobuf field string collation = 4; - * @param string $var - * @return $this - */ - public function setCollation($var) - { - GPBUtil::checkString($var, True); - $this->collation = $var; - - return $this; - } - - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 5; - * @return bool - */ - public function getPrimaryKey() - { - return $this->primary_key; - } - - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 5; - * @param bool $var - * @return $this - */ - public function setPrimaryKey($var) - { - GPBUtil::checkBool($var); - $this->primary_key = $var; - - return $this; - } - - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 6; - * @return bool - */ - public function getNullable() - { - return $this->nullable; - } - - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 6; - * @param bool $var - * @return $this - */ - public function setNullable($var) - { - GPBUtil::checkBool($var); - $this->nullable = $var; - - return $this; - } - - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 7; - * @return int - */ - public function getOrdinalPosition() - { - return $this->ordinal_position; - } - - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 7; - * @param int $var - * @return $this - */ - public function setOrdinalPosition($var) - { - GPBUtil::checkInt32($var); - $this->ordinal_position = $var; - - return $this; - } - - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 8; - * @return int - */ - public function getPrecision() - { - return $this->precision; - } - - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 8; - * @param int $var - * @return $this - */ - public function setPrecision($var) - { - GPBUtil::checkInt32($var); - $this->precision = $var; - - return $this; - } - - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 9; - * @return int - */ - public function getScale() - { - return $this->scale; - } - - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 9; - * @param int $var - * @return $this - */ - public function setScale($var) - { - GPBUtil::checkInt32($var); - $this->scale = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php deleted file mode 100644 index eff1f7b772d5..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlDatabase.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.datastream.v1.MysqlDatabase - */ -class MysqlDatabase extends \Google\Protobuf\Internal\Message -{ - /** - * Database name. - * - * Generated from protobuf field string database = 1; - */ - protected $database = ''; - /** - * Tables in the database. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlTable mysql_tables = 2; - */ - private $mysql_tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Database name. - * @type array<\Google\Cloud\Datastream\V1\MysqlTable>|\Google\Protobuf\Internal\RepeatedField $mysql_tables - * Tables in the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Database name. - * - * Generated from protobuf field string database = 1; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Database name. - * - * 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; - } - - /** - * Tables in the database. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlTable mysql_tables = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMysqlTables() - { - return $this->mysql_tables; - } - - /** - * Tables in the database. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlTable mysql_tables = 2; - * @param array<\Google\Cloud\Datastream\V1\MysqlTable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMysqlTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MysqlTable::class); - $this->mysql_tables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php deleted file mode 100644 index 336ec4bbb055..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlProfile.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.datastream.v1.MysqlProfile - */ -class MysqlProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Hostname for the MySQL connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Port for the MySQL connection, default value is 3306. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - /** - * Required. Username for the MySQL connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Optional. Input only. Password for the MySQL connection. Mutually exclusive - * with the `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $password = ''; - /** - * SSL configuration for the MySQL connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSslConfig ssl_config = 5; - */ - protected $ssl_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hostname - * Required. Hostname for the MySQL connection. - * @type int $port - * Port for the MySQL connection, default value is 3306. - * @type string $username - * Required. Username for the MySQL connection. - * @type string $password - * Optional. Input only. Password for the MySQL connection. Mutually exclusive - * with the `secret_manager_stored_password` field. - * @type \Google\Cloud\Datastream\V1\MysqlSslConfig $ssl_config - * SSL configuration for the MySQL connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Hostname for the MySQL connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. Hostname for the MySQL connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Port for the MySQL connection, default value is 3306. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Port for the MySQL connection, default value is 3306. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Required. Username for the MySQL connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. Username for the MySQL connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Optional. Input only. Password for the MySQL connection. Mutually exclusive - * with the `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Optional. Input only. Password for the MySQL connection. Mutually exclusive - * with the `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * SSL configuration for the MySQL connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSslConfig ssl_config = 5; - * @return \Google\Cloud\Datastream\V1\MysqlSslConfig|null - */ - public function getSslConfig() - { - return $this->ssl_config; - } - - public function hasSslConfig() - { - return isset($this->ssl_config); - } - - public function clearSslConfig() - { - unset($this->ssl_config); - } - - /** - * SSL configuration for the MySQL connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSslConfig ssl_config = 5; - * @param \Google\Cloud\Datastream\V1\MysqlSslConfig $var - * @return $this - */ - public function setSslConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSslConfig::class); - $this->ssl_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php deleted file mode 100644 index afbd2a990797..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlRdbms.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datastream.v1.MysqlRdbms - */ -class MysqlRdbms extends \Google\Protobuf\Internal\Message -{ - /** - * Mysql databases on the server - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlDatabase mysql_databases = 1; - */ - private $mysql_databases; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\MysqlDatabase>|\Google\Protobuf\Internal\RepeatedField $mysql_databases - * Mysql databases on the server - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Mysql databases on the server - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlDatabase mysql_databases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMysqlDatabases() - { - return $this->mysql_databases; - } - - /** - * Mysql databases on the server - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlDatabase mysql_databases = 1; - * @param array<\Google\Cloud\Datastream\V1\MysqlDatabase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMysqlDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MysqlDatabase::class); - $this->mysql_databases = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php deleted file mode 100644 index 2a76e1091653..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSourceConfig.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.datastream.v1.MysqlSourceConfig - */ -class MysqlSourceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * MySQL objects to retrieve from the source. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms include_objects = 1; - */ - protected $include_objects = null; - /** - * MySQL objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms exclude_objects = 2; - */ - protected $exclude_objects = null; - /** - * Maximum number of concurrent CDC tasks. The number should be non negative. - * If not set (or set to 0), the system's default value will be used. - * - * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; - */ - protected $max_concurrent_cdc_tasks = 0; - /** - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; - */ - protected $max_concurrent_backfill_tasks = 0; - protected $cdc_method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\MysqlRdbms $include_objects - * MySQL objects to retrieve from the source. - * @type \Google\Cloud\Datastream\V1\MysqlRdbms $exclude_objects - * MySQL objects to exclude from the stream. - * @type int $max_concurrent_cdc_tasks - * Maximum number of concurrent CDC tasks. The number should be non negative. - * If not set (or set to 0), the system's default value will be used. - * @type int $max_concurrent_backfill_tasks - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition $binary_log_position - * Use Binary log position based replication. - * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid $gtid - * Use GTID based replication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * MySQL objects to retrieve from the source. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms include_objects = 1; - * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null - */ - public function getIncludeObjects() - { - return $this->include_objects; - } - - public function hasIncludeObjects() - { - return isset($this->include_objects); - } - - public function clearIncludeObjects() - { - unset($this->include_objects); - } - - /** - * MySQL objects to retrieve from the source. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms include_objects = 1; - * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var - * @return $this - */ - public function setIncludeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); - $this->include_objects = $var; - - return $this; - } - - /** - * MySQL objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms exclude_objects = 2; - * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null - */ - public function getExcludeObjects() - { - return $this->exclude_objects; - } - - public function hasExcludeObjects() - { - return isset($this->exclude_objects); - } - - public function clearExcludeObjects() - { - unset($this->exclude_objects); - } - - /** - * MySQL objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms exclude_objects = 2; - * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var - * @return $this - */ - public function setExcludeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); - $this->exclude_objects = $var; - - return $this; - } - - /** - * Maximum number of concurrent CDC tasks. The number should be non negative. - * If not set (or set to 0), the system's default value will be used. - * - * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; - * @return int - */ - public function getMaxConcurrentCdcTasks() - { - return $this->max_concurrent_cdc_tasks; - } - - /** - * Maximum number of concurrent CDC tasks. The number should be non negative. - * If not set (or set to 0), the system's default value will be used. - * - * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; - * @param int $var - * @return $this - */ - public function setMaxConcurrentCdcTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_cdc_tasks = $var; - - return $this; - } - - /** - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; - * @return int - */ - public function getMaxConcurrentBackfillTasks() - { - return $this->max_concurrent_backfill_tasks; - } - - /** - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; - * @param int $var - * @return $this - */ - public function setMaxConcurrentBackfillTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_backfill_tasks = $var; - - return $this; - } - - /** - * Use Binary log position based replication. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition binary_log_position = 101; - * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition|null - */ - public function getBinaryLogPosition() - { - return $this->readOneof(101); - } - - public function hasBinaryLogPosition() - { - return $this->hasOneof(101); - } - - /** - * Use Binary log position based replication. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.BinaryLogPosition binary_log_position = 101; - * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition $var - * @return $this - */ - public function setBinaryLogPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig\BinaryLogPosition::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Use GTID based replication. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.Gtid gtid = 102; - * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid|null - */ - public function getGtid() - { - return $this->readOneof(102); - } - - public function hasGtid() - { - return $this->hasOneof(102); - } - - /** - * Use GTID based replication. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig.Gtid gtid = 102; - * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid $var - * @return $this - */ - public function setGtid($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig\Gtid::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * @return string - */ - public function getCdcMethod() - { - return $this->whichOneof("cdc_method"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php deleted file mode 100644 index b18f18794ac6..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlSslConfig.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.datastream.v1.MysqlSslConfig - */ -class MysqlSslConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. PEM-encoded private key associated with the Client Certificate. - * If this field is used then the 'client_certificate' and the - * 'ca_certificate' fields are mandatory. - * - * Generated from protobuf field string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $client_key = ''; - /** - * Output only. Indicates whether the client_key field is set. - * - * Generated from protobuf field bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $client_key_set = false; - /** - * Input only. PEM-encoded certificate that will be used by the replica to - * authenticate against the source database server. If this field is used - * then the 'client_key' and the 'ca_certificate' fields are mandatory. - * - * Generated from protobuf field string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $client_certificate = ''; - /** - * Output only. Indicates whether the client_certificate field is set. - * - * Generated from protobuf field bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $client_certificate_set = false; - /** - * Input only. PEM-encoded certificate of the CA that signed the source - * database server's certificate. - * - * Generated from protobuf field string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $ca_certificate = ''; - /** - * Output only. Indicates whether the ca_certificate field is set. - * - * Generated from protobuf field bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ca_certificate_set = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $client_key - * Input only. PEM-encoded private key associated with the Client Certificate. - * If this field is used then the 'client_certificate' and the - * 'ca_certificate' fields are mandatory. - * @type bool $client_key_set - * Output only. Indicates whether the client_key field is set. - * @type string $client_certificate - * Input only. PEM-encoded certificate that will be used by the replica to - * authenticate against the source database server. If this field is used - * then the 'client_key' and the 'ca_certificate' fields are mandatory. - * @type bool $client_certificate_set - * Output only. Indicates whether the client_certificate field is set. - * @type string $ca_certificate - * Input only. PEM-encoded certificate of the CA that signed the source - * database server's certificate. - * @type bool $ca_certificate_set - * Output only. Indicates whether the ca_certificate field is set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Input only. PEM-encoded private key associated with the Client Certificate. - * If this field is used then the 'client_certificate' and the - * 'ca_certificate' fields are mandatory. - * - * Generated from protobuf field string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getClientKey() - { - return $this->client_key; - } - - /** - * Input only. PEM-encoded private key associated with the Client Certificate. - * If this field is used then the 'client_certificate' and the - * 'ca_certificate' fields are mandatory. - * - * Generated from protobuf field string client_key = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClientKey($var) - { - GPBUtil::checkString($var, True); - $this->client_key = $var; - - return $this; - } - - /** - * Output only. Indicates whether the client_key field is set. - * - * Generated from protobuf field bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClientKeySet() - { - return $this->client_key_set; - } - - /** - * Output only. Indicates whether the client_key field is set. - * - * Generated from protobuf field bool client_key_set = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClientKeySet($var) - { - GPBUtil::checkBool($var); - $this->client_key_set = $var; - - return $this; - } - - /** - * Input only. PEM-encoded certificate that will be used by the replica to - * authenticate against the source database server. If this field is used - * then the 'client_key' and the 'ca_certificate' fields are mandatory. - * - * Generated from protobuf field string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getClientCertificate() - { - return $this->client_certificate; - } - - /** - * Input only. PEM-encoded certificate that will be used by the replica to - * authenticate against the source database server. If this field is used - * then the 'client_key' and the 'ca_certificate' fields are mandatory. - * - * Generated from protobuf field string client_certificate = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setClientCertificate($var) - { - GPBUtil::checkString($var, True); - $this->client_certificate = $var; - - return $this; - } - - /** - * Output only. Indicates whether the client_certificate field is set. - * - * Generated from protobuf field bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getClientCertificateSet() - { - return $this->client_certificate_set; - } - - /** - * Output only. Indicates whether the client_certificate field is set. - * - * Generated from protobuf field bool client_certificate_set = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setClientCertificateSet($var) - { - GPBUtil::checkBool($var); - $this->client_certificate_set = $var; - - return $this; - } - - /** - * Input only. PEM-encoded certificate of the CA that signed the source - * database server's certificate. - * - * Generated from protobuf field string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getCaCertificate() - { - return $this->ca_certificate; - } - - /** - * Input only. PEM-encoded certificate of the CA that signed the source - * database server's certificate. - * - * Generated from protobuf field string ca_certificate = 5 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCaCertificate($var) - { - GPBUtil::checkString($var, True); - $this->ca_certificate = $var; - - return $this; - } - - /** - * Output only. Indicates whether the ca_certificate field is set. - * - * Generated from protobuf field bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getCaCertificateSet() - { - return $this->ca_certificate_set; - } - - /** - * Output only. Indicates whether the ca_certificate field is set. - * - * Generated from protobuf field bool ca_certificate_set = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setCaCertificateSet($var) - { - GPBUtil::checkBool($var); - $this->ca_certificate_set = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php deleted file mode 100644 index 3308503ed276..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/MysqlTable.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.datastream.v1.MysqlTable - */ -class MysqlTable extends \Google\Protobuf\Internal\Message -{ - /** - * Table name. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * MySQL columns in the database. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlColumn mysql_columns = 2; - */ - private $mysql_columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * Table name. - * @type array<\Google\Cloud\Datastream\V1\MysqlColumn>|\Google\Protobuf\Internal\RepeatedField $mysql_columns - * MySQL columns in the database. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Table name. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Table name. - * - * 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; - } - - /** - * MySQL columns in the database. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlColumn mysql_columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMysqlColumns() - { - return $this->mysql_columns; - } - - /** - * MySQL columns in the database. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.MysqlColumn mysql_columns = 2; - * @param array<\Google\Cloud\Datastream\V1\MysqlColumn>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMysqlColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MysqlColumn::class); - $this->mysql_columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php deleted file mode 100644 index 2dae14aae60b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OperationMetadata.php +++ /dev/null @@ -1,355 +0,0 @@ -google.cloud.datastream.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - /** - * Output only. Results of executed validations if there are any. - * - * Generated from protobuf field .google.cloud.datastream.v1.ValidationResult validation_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $validation_result = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * @type \Google\Cloud\Datastream\V1\ValidationResult $validation_result - * Output only. Results of executed validations if there are any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - - /** - * Output only. Results of executed validations if there are any. - * - * Generated from protobuf field .google.cloud.datastream.v1.ValidationResult validation_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Datastream\V1\ValidationResult|null - */ - public function getValidationResult() - { - return $this->validation_result; - } - - public function hasValidationResult() - { - return isset($this->validation_result); - } - - public function clearValidationResult() - { - unset($this->validation_result); - } - - /** - * Output only. Results of executed validations if there are any. - * - * Generated from protobuf field .google.cloud.datastream.v1.ValidationResult validation_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Datastream\V1\ValidationResult $var - * @return $this - */ - public function setValidationResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ValidationResult::class); - $this->validation_result = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php deleted file mode 100644 index 9b6843312358..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleColumn.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.datastream.v1.OracleColumn - */ -class OracleColumn extends \Google\Protobuf\Internal\Message -{ - /** - * Column name. - * - * Generated from protobuf field string column = 1; - */ - protected $column = ''; - /** - * The Oracle data type. - * - * Generated from protobuf field string data_type = 2; - */ - protected $data_type = ''; - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - */ - protected $length = 0; - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 4; - */ - protected $precision = 0; - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 5; - */ - protected $scale = 0; - /** - * Column encoding. - * - * Generated from protobuf field string encoding = 6; - */ - protected $encoding = ''; - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 7; - */ - protected $primary_key = false; - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 8; - */ - protected $nullable = false; - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 9; - */ - protected $ordinal_position = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $column - * Column name. - * @type string $data_type - * The Oracle data type. - * @type int $length - * Column length. - * @type int $precision - * Column precision. - * @type int $scale - * Column scale. - * @type string $encoding - * Column encoding. - * @type bool $primary_key - * Whether or not the column represents a primary key. - * @type bool $nullable - * Whether or not the column can accept a null value. - * @type int $ordinal_position - * The ordinal position of the column in the table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Column name. - * - * Generated from protobuf field string column = 1; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Column name. - * - * Generated from protobuf field string column = 1; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * The Oracle data type. - * - * Generated from protobuf field string data_type = 2; - * @return string - */ - public function getDataType() - { - return $this->data_type; - } - - /** - * The Oracle data type. - * - * Generated from protobuf field string data_type = 2; - * @param string $var - * @return $this - */ - public function setDataType($var) - { - GPBUtil::checkString($var, True); - $this->data_type = $var; - - return $this; - } - - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - * @return int - */ - public function getLength() - { - return $this->length; - } - - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - * @param int $var - * @return $this - */ - public function setLength($var) - { - GPBUtil::checkInt32($var); - $this->length = $var; - - return $this; - } - - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 4; - * @return int - */ - public function getPrecision() - { - return $this->precision; - } - - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 4; - * @param int $var - * @return $this - */ - public function setPrecision($var) - { - GPBUtil::checkInt32($var); - $this->precision = $var; - - return $this; - } - - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 5; - * @return int - */ - public function getScale() - { - return $this->scale; - } - - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 5; - * @param int $var - * @return $this - */ - public function setScale($var) - { - GPBUtil::checkInt32($var); - $this->scale = $var; - - return $this; - } - - /** - * Column encoding. - * - * Generated from protobuf field string encoding = 6; - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Column encoding. - * - * Generated from protobuf field string encoding = 6; - * @param string $var - * @return $this - */ - public function setEncoding($var) - { - GPBUtil::checkString($var, True); - $this->encoding = $var; - - return $this; - } - - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 7; - * @return bool - */ - public function getPrimaryKey() - { - return $this->primary_key; - } - - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 7; - * @param bool $var - * @return $this - */ - public function setPrimaryKey($var) - { - GPBUtil::checkBool($var); - $this->primary_key = $var; - - return $this; - } - - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 8; - * @return bool - */ - public function getNullable() - { - return $this->nullable; - } - - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 8; - * @param bool $var - * @return $this - */ - public function setNullable($var) - { - GPBUtil::checkBool($var); - $this->nullable = $var; - - return $this; - } - - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 9; - * @return int - */ - public function getOrdinalPosition() - { - return $this->ordinal_position; - } - - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 9; - * @param int $var - * @return $this - */ - public function setOrdinalPosition($var) - { - GPBUtil::checkInt32($var); - $this->ordinal_position = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php deleted file mode 100644 index 7df5fc773678..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleProfile.php +++ /dev/null @@ -1,368 +0,0 @@ -google.cloud.datastream.v1.OracleProfile - */ -class OracleProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Hostname for the Oracle connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Port for the Oracle connection, default value is 1521. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - /** - * Required. Username for the Oracle connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Optional. Password for the Oracle connection. Mutually exclusive with the - * `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $password = ''; - /** - * Required. Database for the Oracle connection. - * - * Generated from protobuf field string database_service = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_service = ''; - /** - * Connection string attributes - * - * Generated from protobuf field map connection_attributes = 6; - */ - private $connection_attributes; - /** - * Optional. SSL configuration for the Oracle connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $oracle_ssl_config = null; - /** - * Optional. Configuration for Oracle ASM connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $oracle_asm_config = null; - /** - * Optional. A reference to a Secret Manager resource name storing the Oracle - * connection password. Mutually exclusive with the `password` field. - * - * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $secret_manager_stored_password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hostname - * Required. Hostname for the Oracle connection. - * @type int $port - * Port for the Oracle connection, default value is 1521. - * @type string $username - * Required. Username for the Oracle connection. - * @type string $password - * Optional. Password for the Oracle connection. Mutually exclusive with the - * `secret_manager_stored_password` field. - * @type string $database_service - * Required. Database for the Oracle connection. - * @type array|\Google\Protobuf\Internal\MapField $connection_attributes - * Connection string attributes - * @type \Google\Cloud\Datastream\V1\OracleSslConfig $oracle_ssl_config - * Optional. SSL configuration for the Oracle connection. - * @type \Google\Cloud\Datastream\V1\OracleAsmConfig $oracle_asm_config - * Optional. Configuration for Oracle ASM connection. - * @type string $secret_manager_stored_password - * Optional. A reference to a Secret Manager resource name storing the Oracle - * connection password. Mutually exclusive with the `password` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Hostname for the Oracle connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. Hostname for the Oracle connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Port for the Oracle connection, default value is 1521. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Port for the Oracle connection, default value is 1521. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Required. Username for the Oracle connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. Username for the Oracle connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Optional. Password for the Oracle connection. Mutually exclusive with the - * `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Optional. Password for the Oracle connection. Mutually exclusive with the - * `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Required. Database for the Oracle connection. - * - * Generated from protobuf field string database_service = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseService() - { - return $this->database_service; - } - - /** - * Required. Database for the Oracle connection. - * - * Generated from protobuf field string database_service = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseService($var) - { - GPBUtil::checkString($var, True); - $this->database_service = $var; - - return $this; - } - - /** - * Connection string attributes - * - * Generated from protobuf field map connection_attributes = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getConnectionAttributes() - { - return $this->connection_attributes; - } - - /** - * Connection string attributes - * - * Generated from protobuf field map connection_attributes = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setConnectionAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->connection_attributes = $arr; - - return $this; - } - - /** - * Optional. SSL configuration for the Oracle connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Datastream\V1\OracleSslConfig|null - */ - public function getOracleSslConfig() - { - return $this->oracle_ssl_config; - } - - public function hasOracleSslConfig() - { - return isset($this->oracle_ssl_config); - } - - public function clearOracleSslConfig() - { - unset($this->oracle_ssl_config); - } - - /** - * Optional. SSL configuration for the Oracle connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSslConfig oracle_ssl_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Datastream\V1\OracleSslConfig $var - * @return $this - */ - public function setOracleSslConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSslConfig::class); - $this->oracle_ssl_config = $var; - - return $this; - } - - /** - * Optional. Configuration for Oracle ASM connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Datastream\V1\OracleAsmConfig|null - */ - public function getOracleAsmConfig() - { - return $this->oracle_asm_config; - } - - public function hasOracleAsmConfig() - { - return isset($this->oracle_asm_config); - } - - public function clearOracleAsmConfig() - { - unset($this->oracle_asm_config); - } - - /** - * Optional. Configuration for Oracle ASM connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleAsmConfig oracle_asm_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Datastream\V1\OracleAsmConfig $var - * @return $this - */ - public function setOracleAsmConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleAsmConfig::class); - $this->oracle_asm_config = $var; - - return $this; - } - - /** - * Optional. A reference to a Secret Manager resource name storing the Oracle - * connection password. Mutually exclusive with the `password` field. - * - * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSecretManagerStoredPassword() - { - return $this->secret_manager_stored_password; - } - - /** - * Optional. A reference to a Secret Manager resource name storing the Oracle - * connection password. Mutually exclusive with the `password` field. - * - * Generated from protobuf field string secret_manager_stored_password = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSecretManagerStoredPassword($var) - { - GPBUtil::checkString($var, True); - $this->secret_manager_stored_password = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php deleted file mode 100644 index ca0480d6c821..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleRdbms.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datastream.v1.OracleRdbms - */ -class OracleRdbms extends \Google\Protobuf\Internal\Message -{ - /** - * Oracle schemas/databases in the database server. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleSchema oracle_schemas = 1; - */ - private $oracle_schemas; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\OracleSchema>|\Google\Protobuf\Internal\RepeatedField $oracle_schemas - * Oracle schemas/databases in the database server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Oracle schemas/databases in the database server. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleSchema oracle_schemas = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOracleSchemas() - { - return $this->oracle_schemas; - } - - /** - * Oracle schemas/databases in the database server. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleSchema oracle_schemas = 1; - * @param array<\Google\Cloud\Datastream\V1\OracleSchema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOracleSchemas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\OracleSchema::class); - $this->oracle_schemas = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php deleted file mode 100644 index 44b354a15ab6..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSchema.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.datastream.v1.OracleSchema - */ -class OracleSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Schema name. - * - * Generated from protobuf field string schema = 1; - */ - protected $schema = ''; - /** - * Tables in the schema. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleTable oracle_tables = 2; - */ - private $oracle_tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schema - * Schema name. - * @type array<\Google\Cloud\Datastream\V1\OracleTable>|\Google\Protobuf\Internal\RepeatedField $oracle_tables - * Tables in the schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Schema name. - * - * Generated from protobuf field string schema = 1; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Schema name. - * - * Generated from protobuf field string schema = 1; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - - /** - * Tables in the schema. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleTable oracle_tables = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOracleTables() - { - return $this->oracle_tables; - } - - /** - * Tables in the schema. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleTable oracle_tables = 2; - * @param array<\Google\Cloud\Datastream\V1\OracleTable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOracleTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\OracleTable::class); - $this->oracle_tables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php deleted file mode 100644 index a0c1272ab88b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig.php +++ /dev/null @@ -1,347 +0,0 @@ -google.cloud.datastream.v1.OracleSourceConfig - */ -class OracleSourceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Oracle objects to include in the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms include_objects = 1; - */ - protected $include_objects = null; - /** - * Oracle objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms exclude_objects = 2; - */ - protected $exclude_objects = null; - /** - * Maximum number of concurrent CDC tasks. The number should be non-negative. - * If not set (or set to 0), the system's default value is used. - * - * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; - */ - protected $max_concurrent_cdc_tasks = 0; - /** - * Maximum number of concurrent backfill tasks. The number should be - * non-negative. If not set (or set to 0), the system's default value is used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; - */ - protected $max_concurrent_backfill_tasks = 0; - protected $large_objects_handling; - protected $cdc_method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\OracleRdbms $include_objects - * Oracle objects to include in the stream. - * @type \Google\Cloud\Datastream\V1\OracleRdbms $exclude_objects - * Oracle objects to exclude from the stream. - * @type int $max_concurrent_cdc_tasks - * Maximum number of concurrent CDC tasks. The number should be non-negative. - * If not set (or set to 0), the system's default value is used. - * @type int $max_concurrent_backfill_tasks - * Maximum number of concurrent backfill tasks. The number should be - * non-negative. If not set (or set to 0), the system's default value is used. - * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects $drop_large_objects - * Drop large object values. - * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects $stream_large_objects - * Stream large object values. - * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner $log_miner - * Use LogMiner. - * @type \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser $binary_log_parser - * Use Binary Log Parser. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Oracle objects to include in the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms include_objects = 1; - * @return \Google\Cloud\Datastream\V1\OracleRdbms|null - */ - public function getIncludeObjects() - { - return $this->include_objects; - } - - public function hasIncludeObjects() - { - return isset($this->include_objects); - } - - public function clearIncludeObjects() - { - unset($this->include_objects); - } - - /** - * Oracle objects to include in the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms include_objects = 1; - * @param \Google\Cloud\Datastream\V1\OracleRdbms $var - * @return $this - */ - public function setIncludeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); - $this->include_objects = $var; - - return $this; - } - - /** - * Oracle objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms exclude_objects = 2; - * @return \Google\Cloud\Datastream\V1\OracleRdbms|null - */ - public function getExcludeObjects() - { - return $this->exclude_objects; - } - - public function hasExcludeObjects() - { - return isset($this->exclude_objects); - } - - public function clearExcludeObjects() - { - unset($this->exclude_objects); - } - - /** - * Oracle objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms exclude_objects = 2; - * @param \Google\Cloud\Datastream\V1\OracleRdbms $var - * @return $this - */ - public function setExcludeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); - $this->exclude_objects = $var; - - return $this; - } - - /** - * Maximum number of concurrent CDC tasks. The number should be non-negative. - * If not set (or set to 0), the system's default value is used. - * - * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; - * @return int - */ - public function getMaxConcurrentCdcTasks() - { - return $this->max_concurrent_cdc_tasks; - } - - /** - * Maximum number of concurrent CDC tasks. The number should be non-negative. - * If not set (or set to 0), the system's default value is used. - * - * Generated from protobuf field int32 max_concurrent_cdc_tasks = 3; - * @param int $var - * @return $this - */ - public function setMaxConcurrentCdcTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_cdc_tasks = $var; - - return $this; - } - - /** - * Maximum number of concurrent backfill tasks. The number should be - * non-negative. If not set (or set to 0), the system's default value is used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; - * @return int - */ - public function getMaxConcurrentBackfillTasks() - { - return $this->max_concurrent_backfill_tasks; - } - - /** - * Maximum number of concurrent backfill tasks. The number should be - * non-negative. If not set (or set to 0), the system's default value is used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 4; - * @param int $var - * @return $this - */ - public function setMaxConcurrentBackfillTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_backfill_tasks = $var; - - return $this; - } - - /** - * Drop large object values. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects drop_large_objects = 100; - * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects|null - */ - public function getDropLargeObjects() - { - return $this->readOneof(100); - } - - public function hasDropLargeObjects() - { - return $this->hasOneof(100); - } - - /** - * Drop large object values. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects drop_large_objects = 100; - * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects $var - * @return $this - */ - public function setDropLargeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\DropLargeObjects::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Stream large object values. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects stream_large_objects = 102; - * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects|null - */ - public function getStreamLargeObjects() - { - return $this->readOneof(102); - } - - public function hasStreamLargeObjects() - { - return $this->hasOneof(102); - } - - /** - * Stream large object values. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects stream_large_objects = 102; - * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects $var - * @return $this - */ - public function setStreamLargeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\StreamLargeObjects::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Use LogMiner. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.LogMiner log_miner = 103; - * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner|null - */ - public function getLogMiner() - { - return $this->readOneof(103); - } - - public function hasLogMiner() - { - return $this->hasOneof(103); - } - - /** - * Use LogMiner. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.LogMiner log_miner = 103; - * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner $var - * @return $this - */ - public function setLogMiner($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\LogMiner::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * Use Binary Log Parser. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser binary_log_parser = 104; - * @return \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser|null - */ - public function getBinaryLogParser() - { - return $this->readOneof(104); - } - - public function hasBinaryLogParser() - { - return $this->hasOneof(104); - } - - /** - * Use Binary Log Parser. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig.BinaryLogParser binary_log_parser = 104; - * @param \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser $var - * @return $this - */ - public function setBinaryLogParser($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig\BinaryLogParser::class); - $this->writeOneof(104, $var); - - return $this; - } - - /** - * @return string - */ - public function getLargeObjectsHandling() - { - return $this->whichOneof("large_objects_handling"); - } - - /** - * @return string - */ - public function getCdcMethod() - { - return $this->whichOneof("cdc_method"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php deleted file mode 100644 index 5e8f789daa8f..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/DropLargeObjects.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.datastream.v1.OracleSourceConfig.DropLargeObjects - */ -class DropLargeObjects extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DropLargeObjects::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_DropLargeObjects::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php deleted file mode 100644 index a2ee465e40b5..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleSourceConfig/StreamLargeObjects.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.datastream.v1.OracleSourceConfig.StreamLargeObjects - */ -class StreamLargeObjects extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StreamLargeObjects::class, \Google\Cloud\Datastream\V1\OracleSourceConfig_StreamLargeObjects::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php deleted file mode 100644 index 26283f2fdb8f..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/OracleTable.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.datastream.v1.OracleTable - */ -class OracleTable extends \Google\Protobuf\Internal\Message -{ - /** - * Table name. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * Oracle columns in the schema. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleColumn oracle_columns = 2; - */ - private $oracle_columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * Table name. - * @type array<\Google\Cloud\Datastream\V1\OracleColumn>|\Google\Protobuf\Internal\RepeatedField $oracle_columns - * Oracle columns in the schema. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Table name. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Table name. - * - * 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; - } - - /** - * Oracle columns in the schema. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleColumn oracle_columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOracleColumns() - { - return $this->oracle_columns; - } - - /** - * Oracle columns in the schema. - * When unspecified as part of include/exclude objects, includes/excludes - * everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.OracleColumn oracle_columns = 2; - * @param array<\Google\Cloud\Datastream\V1\OracleColumn>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOracleColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\OracleColumn::class); - $this->oracle_columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php deleted file mode 100644 index aa1bed895293..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlColumn.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.datastream.v1.PostgresqlColumn - */ -class PostgresqlColumn extends \Google\Protobuf\Internal\Message -{ - /** - * Column name. - * - * Generated from protobuf field string column = 1; - */ - protected $column = ''; - /** - * The PostgreSQL data type. - * - * Generated from protobuf field string data_type = 2; - */ - protected $data_type = ''; - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - */ - protected $length = 0; - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 4; - */ - protected $precision = 0; - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 5; - */ - protected $scale = 0; - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 7; - */ - protected $primary_key = false; - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 8; - */ - protected $nullable = false; - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 9; - */ - protected $ordinal_position = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $column - * Column name. - * @type string $data_type - * The PostgreSQL data type. - * @type int $length - * Column length. - * @type int $precision - * Column precision. - * @type int $scale - * Column scale. - * @type bool $primary_key - * Whether or not the column represents a primary key. - * @type bool $nullable - * Whether or not the column can accept a null value. - * @type int $ordinal_position - * The ordinal position of the column in the table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Column name. - * - * Generated from protobuf field string column = 1; - * @return string - */ - public function getColumn() - { - return $this->column; - } - - /** - * Column name. - * - * Generated from protobuf field string column = 1; - * @param string $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkString($var, True); - $this->column = $var; - - return $this; - } - - /** - * The PostgreSQL data type. - * - * Generated from protobuf field string data_type = 2; - * @return string - */ - public function getDataType() - { - return $this->data_type; - } - - /** - * The PostgreSQL data type. - * - * Generated from protobuf field string data_type = 2; - * @param string $var - * @return $this - */ - public function setDataType($var) - { - GPBUtil::checkString($var, True); - $this->data_type = $var; - - return $this; - } - - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - * @return int - */ - public function getLength() - { - return $this->length; - } - - /** - * Column length. - * - * Generated from protobuf field int32 length = 3; - * @param int $var - * @return $this - */ - public function setLength($var) - { - GPBUtil::checkInt32($var); - $this->length = $var; - - return $this; - } - - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 4; - * @return int - */ - public function getPrecision() - { - return $this->precision; - } - - /** - * Column precision. - * - * Generated from protobuf field int32 precision = 4; - * @param int $var - * @return $this - */ - public function setPrecision($var) - { - GPBUtil::checkInt32($var); - $this->precision = $var; - - return $this; - } - - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 5; - * @return int - */ - public function getScale() - { - return $this->scale; - } - - /** - * Column scale. - * - * Generated from protobuf field int32 scale = 5; - * @param int $var - * @return $this - */ - public function setScale($var) - { - GPBUtil::checkInt32($var); - $this->scale = $var; - - return $this; - } - - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 7; - * @return bool - */ - public function getPrimaryKey() - { - return $this->primary_key; - } - - /** - * Whether or not the column represents a primary key. - * - * Generated from protobuf field bool primary_key = 7; - * @param bool $var - * @return $this - */ - public function setPrimaryKey($var) - { - GPBUtil::checkBool($var); - $this->primary_key = $var; - - return $this; - } - - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 8; - * @return bool - */ - public function getNullable() - { - return $this->nullable; - } - - /** - * Whether or not the column can accept a null value. - * - * Generated from protobuf field bool nullable = 8; - * @param bool $var - * @return $this - */ - public function setNullable($var) - { - GPBUtil::checkBool($var); - $this->nullable = $var; - - return $this; - } - - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 9; - * @return int - */ - public function getOrdinalPosition() - { - return $this->ordinal_position; - } - - /** - * The ordinal position of the column in the table. - * - * Generated from protobuf field int32 ordinal_position = 9; - * @param int $var - * @return $this - */ - public function setOrdinalPosition($var) - { - GPBUtil::checkInt32($var); - $this->ordinal_position = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php deleted file mode 100644 index 98271511af72..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlProfile.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.datastream.v1.PostgresqlProfile - */ -class PostgresqlProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Hostname for the PostgreSQL connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hostname = ''; - /** - * Port for the PostgreSQL connection, default value is 5432. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - /** - * Required. Username for the PostgreSQL connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Optional. Password for the PostgreSQL connection. Mutually exclusive with - * the `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $password = ''; - /** - * Required. Database for the PostgreSQL connection. - * - * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hostname - * Required. Hostname for the PostgreSQL connection. - * @type int $port - * Port for the PostgreSQL connection, default value is 5432. - * @type string $username - * Required. Username for the PostgreSQL connection. - * @type string $password - * Optional. Password for the PostgreSQL connection. Mutually exclusive with - * the `secret_manager_stored_password` field. - * @type string $database - * Required. Database for the PostgreSQL connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Hostname for the PostgreSQL connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Required. Hostname for the PostgreSQL connection. - * - * Generated from protobuf field string hostname = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Port for the PostgreSQL connection, default value is 5432. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Port for the PostgreSQL connection, default value is 5432. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Required. Username for the PostgreSQL connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. Username for the PostgreSQL connection. - * - * Generated from protobuf field string username = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Optional. Password for the PostgreSQL connection. Mutually exclusive with - * the `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Optional. Password for the PostgreSQL connection. Mutually exclusive with - * the `secret_manager_stored_password` field. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Required. Database for the PostgreSQL connection. - * - * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. Database for the PostgreSQL connection. - * - * Generated from protobuf field string database = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php deleted file mode 100644 index 0d3297210dd9..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlRdbms.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.datastream.v1.PostgresqlRdbms - */ -class PostgresqlRdbms extends \Google\Protobuf\Internal\Message -{ - /** - * PostgreSQL schemas in the database server. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlSchema postgresql_schemas = 1; - */ - private $postgresql_schemas; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\PostgresqlSchema>|\Google\Protobuf\Internal\RepeatedField $postgresql_schemas - * PostgreSQL schemas in the database server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * PostgreSQL schemas in the database server. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlSchema postgresql_schemas = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPostgresqlSchemas() - { - return $this->postgresql_schemas; - } - - /** - * PostgreSQL schemas in the database server. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlSchema postgresql_schemas = 1; - * @param array<\Google\Cloud\Datastream\V1\PostgresqlSchema>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPostgresqlSchemas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PostgresqlSchema::class); - $this->postgresql_schemas = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php deleted file mode 100644 index 811620dd83bf..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSchema.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.datastream.v1.PostgresqlSchema - */ -class PostgresqlSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Schema name. - * - * Generated from protobuf field string schema = 1; - */ - protected $schema = ''; - /** - * Tables in the schema. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlTable postgresql_tables = 2; - */ - private $postgresql_tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schema - * Schema name. - * @type array<\Google\Cloud\Datastream\V1\PostgresqlTable>|\Google\Protobuf\Internal\RepeatedField $postgresql_tables - * Tables in the schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Schema name. - * - * Generated from protobuf field string schema = 1; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Schema name. - * - * Generated from protobuf field string schema = 1; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - - /** - * Tables in the schema. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlTable postgresql_tables = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPostgresqlTables() - { - return $this->postgresql_tables; - } - - /** - * Tables in the schema. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlTable postgresql_tables = 2; - * @param array<\Google\Cloud\Datastream\V1\PostgresqlTable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPostgresqlTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PostgresqlTable::class); - $this->postgresql_tables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php deleted file mode 100644 index eb5591c3d90d..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlSourceConfig.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.datastream.v1.PostgresqlSourceConfig - */ -class PostgresqlSourceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * PostgreSQL objects to include in the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1; - */ - protected $include_objects = null; - /** - * PostgreSQL objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2; - */ - protected $exclude_objects = null; - /** - * Required. Immutable. The name of the logical replication slot that's - * configured with the pgoutput plugin. - * - * Generated from protobuf field string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $replication_slot = ''; - /** - * Required. The name of the publication that includes the set of all tables - * that are defined in the stream's include_objects. - * - * Generated from protobuf field string publication = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $publication = ''; - /** - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 5; - */ - protected $max_concurrent_backfill_tasks = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $include_objects - * PostgreSQL objects to include in the stream. - * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $exclude_objects - * PostgreSQL objects to exclude from the stream. - * @type string $replication_slot - * Required. Immutable. The name of the logical replication slot that's - * configured with the pgoutput plugin. - * @type string $publication - * Required. The name of the publication that includes the set of all tables - * that are defined in the stream's include_objects. - * @type int $max_concurrent_backfill_tasks - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * PostgreSQL objects to include in the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1; - * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null - */ - public function getIncludeObjects() - { - return $this->include_objects; - } - - public function hasIncludeObjects() - { - return isset($this->include_objects); - } - - public function clearIncludeObjects() - { - unset($this->include_objects); - } - - /** - * PostgreSQL objects to include in the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms include_objects = 1; - * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var - * @return $this - */ - public function setIncludeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); - $this->include_objects = $var; - - return $this; - } - - /** - * PostgreSQL objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2; - * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null - */ - public function getExcludeObjects() - { - return $this->exclude_objects; - } - - public function hasExcludeObjects() - { - return isset($this->exclude_objects); - } - - public function clearExcludeObjects() - { - unset($this->exclude_objects); - } - - /** - * PostgreSQL objects to exclude from the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms exclude_objects = 2; - * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var - * @return $this - */ - public function setExcludeObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); - $this->exclude_objects = $var; - - return $this; - } - - /** - * Required. Immutable. The name of the logical replication slot that's - * configured with the pgoutput plugin. - * - * Generated from protobuf field string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getReplicationSlot() - { - return $this->replication_slot; - } - - /** - * Required. Immutable. The name of the logical replication slot that's - * configured with the pgoutput plugin. - * - * Generated from protobuf field string replication_slot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setReplicationSlot($var) - { - GPBUtil::checkString($var, True); - $this->replication_slot = $var; - - return $this; - } - - /** - * Required. The name of the publication that includes the set of all tables - * that are defined in the stream's include_objects. - * - * Generated from protobuf field string publication = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPublication() - { - return $this->publication; - } - - /** - * Required. The name of the publication that includes the set of all tables - * that are defined in the stream's include_objects. - * - * Generated from protobuf field string publication = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPublication($var) - { - GPBUtil::checkString($var, True); - $this->publication = $var; - - return $this; - } - - /** - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 5; - * @return int - */ - public function getMaxConcurrentBackfillTasks() - { - return $this->max_concurrent_backfill_tasks; - } - - /** - * Maximum number of concurrent backfill tasks. The number should be non - * negative. If not set (or set to 0), the system's default value will be - * used. - * - * Generated from protobuf field int32 max_concurrent_backfill_tasks = 5; - * @param int $var - * @return $this - */ - public function setMaxConcurrentBackfillTasks($var) - { - GPBUtil::checkInt32($var); - $this->max_concurrent_backfill_tasks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php deleted file mode 100644 index 27df4f452fe8..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PostgresqlTable.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.datastream.v1.PostgresqlTable - */ -class PostgresqlTable extends \Google\Protobuf\Internal\Message -{ - /** - * Table name. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * PostgreSQL columns in the schema. - * When unspecified as part of include/exclude objects, - * includes/excludes everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlColumn postgresql_columns = 2; - */ - private $postgresql_columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * Table name. - * @type array<\Google\Cloud\Datastream\V1\PostgresqlColumn>|\Google\Protobuf\Internal\RepeatedField $postgresql_columns - * PostgreSQL columns in the schema. - * When unspecified as part of include/exclude objects, - * includes/excludes everything. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Table name. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Table name. - * - * 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; - } - - /** - * PostgreSQL columns in the schema. - * When unspecified as part of include/exclude objects, - * includes/excludes everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlColumn postgresql_columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPostgresqlColumns() - { - return $this->postgresql_columns; - } - - /** - * PostgreSQL columns in the schema. - * When unspecified as part of include/exclude objects, - * includes/excludes everything. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.PostgresqlColumn postgresql_columns = 2; - * @param array<\Google\Cloud\Datastream\V1\PostgresqlColumn>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPostgresqlColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\PostgresqlColumn::class); - $this->postgresql_columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php deleted file mode 100644 index 0a12094ca2f5..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection.php +++ /dev/null @@ -1,350 +0,0 @@ -google.cloud.datastream.v1.PrivateConnection - */ -class PrivateConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Output only. The state of the Private Connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. In case of error, the details of the error in a user-friendly - * format. - * - * Generated from protobuf field .google.cloud.datastream.v1.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * VPC Peering Config. - * - * Generated from protobuf field .google.cloud.datastream.v1.VpcPeeringConfig vpc_peering_config = 100; - */ - protected $vpc_peering_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource's name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time of the resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time of the resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels. - * @type string $display_name - * Required. Display name. - * @type int $state - * Output only. The state of the Private Connection. - * @type \Google\Cloud\Datastream\V1\Error $error - * Output only. In case of error, the details of the error in a user-friendly - * format. - * @type \Google\Cloud\Datastream\V1\VpcPeeringConfig $vpc_peering_config - * VPC Peering Config. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The state of the Private Connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the Private Connection. - * - * Generated from protobuf field .google.cloud.datastream.v1.PrivateConnection.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\PrivateConnection\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. In case of error, the details of the error in a user-friendly - * format. - * - * Generated from protobuf field .google.cloud.datastream.v1.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Datastream\V1\Error|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. In case of error, the details of the error in a user-friendly - * format. - * - * Generated from protobuf field .google.cloud.datastream.v1.Error error = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Datastream\V1\Error $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Error::class); - $this->error = $var; - - return $this; - } - - /** - * VPC Peering Config. - * - * Generated from protobuf field .google.cloud.datastream.v1.VpcPeeringConfig vpc_peering_config = 100; - * @return \Google\Cloud\Datastream\V1\VpcPeeringConfig|null - */ - public function getVpcPeeringConfig() - { - return $this->vpc_peering_config; - } - - public function hasVpcPeeringConfig() - { - return isset($this->vpc_peering_config); - } - - public function clearVpcPeeringConfig() - { - unset($this->vpc_peering_config); - } - - /** - * VPC Peering Config. - * - * Generated from protobuf field .google.cloud.datastream.v1.VpcPeeringConfig vpc_peering_config = 100; - * @param \Google\Cloud\Datastream\V1\VpcPeeringConfig $var - * @return $this - */ - public function setVpcPeeringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\VpcPeeringConfig::class); - $this->vpc_peering_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php deleted file mode 100644 index 55476d13a328..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnection/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.datastream.v1.PrivateConnection.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The private connection is in creation state - creating resources. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The private connection has been created with all of its resources. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * The private connection creation has failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - /** - * The private connection is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Delete request has failed, resource is in invalid state. - * - * Generated from protobuf enum FAILED_TO_DELETE = 5; - */ - const FAILED_TO_DELETE = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::FAILED => 'FAILED', - self::DELETING => 'DELETING', - self::FAILED_TO_DELETE => 'FAILED_TO_DELETE', - ]; - - 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(State::class, \Google\Cloud\Datastream\V1\PrivateConnection_State::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php deleted file mode 100644 index 4ce213398a70..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/PrivateConnectivity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.datastream.v1.PrivateConnectivity - */ -class PrivateConnectivity extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A reference to a private connection resource. - * Format: `projects/{project}/locations/{location}/privateConnections/{name}` - * - * Generated from protobuf field string private_connection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $private_connection = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $private_connection - * Required. A reference to a private connection resource. - * Format: `projects/{project}/locations/{location}/privateConnections/{name}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. A reference to a private connection resource. - * Format: `projects/{project}/locations/{location}/privateConnections/{name}` - * - * Generated from protobuf field string private_connection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPrivateConnection() - { - return $this->private_connection; - } - - /** - * Required. A reference to a private connection resource. - * Format: `projects/{project}/locations/{location}/privateConnections/{name}` - * - * Generated from protobuf field string private_connection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPrivateConnection($var) - { - GPBUtil::checkString($var, True); - $this->private_connection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php deleted file mode 100644 index d6442b1f2852..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Route.php +++ /dev/null @@ -1,292 +0,0 @@ -google.cloud.datastream.v1.Route - */ -class Route extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. Destination address for connection - * - * Generated from protobuf field string destination_address = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination_address = ''; - /** - * Destination port for connection - * - * Generated from protobuf field int32 destination_port = 7; - */ - protected $destination_port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource's name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create time of the resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update time of the resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels. - * @type string $display_name - * Required. Display name. - * @type string $destination_address - * Required. Destination address for connection - * @type int $destination_port - * Destination port for connection - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update time of the resource. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. Destination address for connection - * - * Generated from protobuf field string destination_address = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDestinationAddress() - { - return $this->destination_address; - } - - /** - * Required. Destination address for connection - * - * Generated from protobuf field string destination_address = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDestinationAddress($var) - { - GPBUtil::checkString($var, True); - $this->destination_address = $var; - - return $this; - } - - /** - * Destination port for connection - * - * Generated from protobuf field int32 destination_port = 7; - * @return int - */ - public function getDestinationPort() - { - return $this->destination_port; - } - - /** - * Destination port for connection - * - * Generated from protobuf field int32 destination_port = 7; - * @param int $var - * @return $this - */ - public function setDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->destination_port = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php deleted file mode 100644 index 6d1f9348d6e8..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceConfig.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.datastream.v1.SourceConfig - */ -class SourceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Source connection profile resoource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * - * Generated from protobuf field string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source_connection_profile = ''; - protected $source_stream_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_connection_profile - * Required. Source connection profile resoource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * @type \Google\Cloud\Datastream\V1\OracleSourceConfig $oracle_source_config - * Oracle data source configuration. - * @type \Google\Cloud\Datastream\V1\MysqlSourceConfig $mysql_source_config - * MySQL data source configuration. - * @type \Google\Cloud\Datastream\V1\PostgresqlSourceConfig $postgresql_source_config - * PostgreSQL data source configuration. - * @type \Google\Cloud\Datastream\V1\SqlServerSourceConfig $sql_server_source_config - * SQLServer data source configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Source connection profile resoource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * - * Generated from protobuf field string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceConnectionProfile() - { - return $this->source_connection_profile; - } - - /** - * Required. Source connection profile resoource. - * Format: `projects/{project}/locations/{location}/connectionProfiles/{name}` - * - * Generated from protobuf field string source_connection_profile = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceConnectionProfile($var) - { - GPBUtil::checkString($var, True); - $this->source_connection_profile = $var; - - return $this; - } - - /** - * Oracle data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100; - * @return \Google\Cloud\Datastream\V1\OracleSourceConfig|null - */ - public function getOracleSourceConfig() - { - return $this->readOneof(100); - } - - public function hasOracleSourceConfig() - { - return $this->hasOneof(100); - } - - /** - * Oracle data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleSourceConfig oracle_source_config = 100; - * @param \Google\Cloud\Datastream\V1\OracleSourceConfig $var - * @return $this - */ - public function setOracleSourceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleSourceConfig::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * MySQL data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101; - * @return \Google\Cloud\Datastream\V1\MysqlSourceConfig|null - */ - public function getMysqlSourceConfig() - { - return $this->readOneof(101); - } - - public function hasMysqlSourceConfig() - { - return $this->hasOneof(101); - } - - /** - * MySQL data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlSourceConfig mysql_source_config = 101; - * @param \Google\Cloud\Datastream\V1\MysqlSourceConfig $var - * @return $this - */ - public function setMysqlSourceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlSourceConfig::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * PostgreSQL data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102; - * @return \Google\Cloud\Datastream\V1\PostgresqlSourceConfig|null - */ - public function getPostgresqlSourceConfig() - { - return $this->readOneof(102); - } - - public function hasPostgresqlSourceConfig() - { - return $this->hasOneof(102); - } - - /** - * PostgreSQL data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlSourceConfig postgresql_source_config = 102; - * @param \Google\Cloud\Datastream\V1\PostgresqlSourceConfig $var - * @return $this - */ - public function setPostgresqlSourceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlSourceConfig::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * SQLServer data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerSourceConfig sql_server_source_config = 103; - * @return \Google\Cloud\Datastream\V1\SqlServerSourceConfig|null - */ - public function getSqlServerSourceConfig() - { - return $this->readOneof(103); - } - - public function hasSqlServerSourceConfig() - { - return $this->hasOneof(103); - } - - /** - * SQLServer data source configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerSourceConfig sql_server_source_config = 103; - * @param \Google\Cloud\Datastream\V1\SqlServerSourceConfig $var - * @return $this - */ - public function setSqlServerSourceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerSourceConfig::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceStreamConfig() - { - return $this->whichOneof("source_stream_config"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php deleted file mode 100644 index 55441bf10169..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.datastream.v1.SourceObjectIdentifier - */ -class SourceObjectIdentifier extends \Google\Protobuf\Internal\Message -{ - protected $source_identifier; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier $oracle_identifier - * Oracle data source object identifier. - * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier $mysql_identifier - * Mysql data source object identifier. - * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier $postgresql_identifier - * PostgreSQL data source object identifier. - * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier $sql_server_identifier - * SQLServer data source object identifier. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Oracle data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier oracle_identifier = 1; - * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier|null - */ - public function getOracleIdentifier() - { - return $this->readOneof(1); - } - - public function hasOracleIdentifier() - { - return $this->hasOneof(1); - } - - /** - * Oracle data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier oracle_identifier = 1; - * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier $var - * @return $this - */ - public function setOracleIdentifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\OracleObjectIdentifier::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Mysql data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier mysql_identifier = 2; - * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier|null - */ - public function getMysqlIdentifier() - { - return $this->readOneof(2); - } - - public function hasMysqlIdentifier() - { - return $this->hasOneof(2); - } - - /** - * Mysql data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier mysql_identifier = 2; - * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier $var - * @return $this - */ - public function setMysqlIdentifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\MysqlObjectIdentifier::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * PostgreSQL data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier postgresql_identifier = 3; - * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier|null - */ - public function getPostgresqlIdentifier() - { - return $this->readOneof(3); - } - - public function hasPostgresqlIdentifier() - { - return $this->hasOneof(3); - } - - /** - * PostgreSQL data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier postgresql_identifier = 3; - * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier $var - * @return $this - */ - public function setPostgresqlIdentifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\PostgresqlObjectIdentifier::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * SQLServer data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier sql_server_identifier = 4; - * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier|null - */ - public function getSqlServerIdentifier() - { - return $this->readOneof(4); - } - - public function hasSqlServerIdentifier() - { - return $this->hasOneof(4); - } - - /** - * SQLServer data source object identifier. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier.SqlServerObjectIdentifier sql_server_identifier = 4; - * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier $var - * @return $this - */ - public function setSqlServerIdentifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier\SqlServerObjectIdentifier::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceIdentifier() - { - return $this->whichOneof("source_identifier"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php deleted file mode 100644 index 3ea4813f9416..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/MysqlObjectIdentifier.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.datastream.v1.SourceObjectIdentifier.MysqlObjectIdentifier - */ -class MysqlObjectIdentifier extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. - * @type string $table - * Required. The table name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MysqlObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_MysqlObjectIdentifier::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php deleted file mode 100644 index 472b7baa2c9a..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/OracleObjectIdentifier.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.datastream.v1.SourceObjectIdentifier.OracleObjectIdentifier - */ -class OracleObjectIdentifier extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The schema name. - * - * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = ''; - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schema - * Required. The schema name. - * @type string $table - * Required. The table name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The schema name. - * - * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Required. The schema name. - * - * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OracleObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_OracleObjectIdentifier::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php deleted file mode 100644 index 09ac2062ba68..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/SourceObjectIdentifier/PostgresqlObjectIdentifier.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.datastream.v1.SourceObjectIdentifier.PostgresqlObjectIdentifier - */ -class PostgresqlObjectIdentifier extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The schema name. - * - * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schema = ''; - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schema - * Required. The schema name. - * @type string $table - * Required. The table name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The schema name. - * - * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Required. The schema name. - * - * Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Required. The table name. - * - * Generated from protobuf field string table = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostgresqlObjectIdentifier::class, \Google\Cloud\Datastream\V1\SourceObjectIdentifier_PostgresqlObjectIdentifier::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php deleted file mode 100644 index fe03b89f447b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.datastream.v1.StartBackfillJobRequest - */ -class StartBackfillJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream object resource to start a backfill job - * for. - * - * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $object = ''; - - /** - * @param string $object Required. The name of the stream object resource to start a backfill job - * for. Please see - * {@see DatastreamClient::streamObjectName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\StartBackfillJobRequest - * - * @experimental - */ - public static function build(string $object): self - { - return (new self()) - ->setObject($object); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $object - * Required. The name of the stream object resource to start a backfill job - * for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream object resource to start a backfill job - * for. - * - * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Required. The name of the stream object resource to start a backfill job - * for. - * - * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php deleted file mode 100644 index 8ef6648c840d..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StartBackfillJobResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.datastream.v1.StartBackfillJobResponse - */ -class StartBackfillJobResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The stream object resource a backfill job was started for. - * - * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; - */ - protected $object = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\StreamObject $object - * The stream object resource a backfill job was started for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * The stream object resource a backfill job was started for. - * - * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; - * @return \Google\Cloud\Datastream\V1\StreamObject|null - */ - public function getObject() - { - return $this->object; - } - - public function hasObject() - { - return isset($this->object); - } - - public function clearObject() - { - unset($this->object); - } - - /** - * The stream object resource a backfill job was started for. - * - * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; - * @param \Google\Cloud\Datastream\V1\StreamObject $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\StreamObject::class); - $this->object = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php deleted file mode 100644 index d882743d2335..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StaticServiceIpConnectivity.php +++ /dev/null @@ -1,35 +0,0 @@ -google.cloud.datastream.v1.StaticServiceIpConnectivity - */ -class StaticServiceIpConnectivity extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php deleted file mode 100644 index c334820dcc5f..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.datastream.v1.StopBackfillJobRequest - */ -class StopBackfillJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream object resource to stop the backfill job - * for. - * - * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $object = ''; - - /** - * @param string $object Required. The name of the stream object resource to stop the backfill job - * for. Please see - * {@see DatastreamClient::streamObjectName()} for help formatting this field. - * - * @return \Google\Cloud\Datastream\V1\StopBackfillJobRequest - * - * @experimental - */ - public static function build(string $object): self - { - return (new self()) - ->setObject($object); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $object - * Required. The name of the stream object resource to stop the backfill job - * for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream object resource to stop the backfill job - * for. - * - * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Required. The name of the stream object resource to stop the backfill job - * for. - * - * Generated from protobuf field string object = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php deleted file mode 100644 index 636cec779845..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StopBackfillJobResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.datastream.v1.StopBackfillJobResponse - */ -class StopBackfillJobResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The stream object resource the backfill job was stopped for. - * - * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; - */ - protected $object = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\StreamObject $object - * The stream object resource the backfill job was stopped for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * The stream object resource the backfill job was stopped for. - * - * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; - * @return \Google\Cloud\Datastream\V1\StreamObject|null - */ - public function getObject() - { - return $this->object; - } - - public function hasObject() - { - return isset($this->object); - } - - public function clearObject() - { - unset($this->object); - } - - /** - * The stream object resource the backfill job was stopped for. - * - * Generated from protobuf field .google.cloud.datastream.v1.StreamObject object = 1; - * @param \Google\Cloud\Datastream\V1\StreamObject $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\StreamObject::class); - $this->object = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php deleted file mode 100644 index 031abfdec7bf..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream.php +++ /dev/null @@ -1,561 +0,0 @@ -google.cloud.datastream.v1.Stream - */ -class Stream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The stream's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The creation time of the stream. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update time of the stream. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Required. Source connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_config = null; - /** - * Required. Destination connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination_config = null; - /** - * The state of the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.State state = 8; - */ - protected $state = 0; - /** - * Output only. Errors on the Stream. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * Immutable. A reference to a KMS encryption key. - * If provided, it will be used to encrypt the data. - * If left blank, data will be encrypted using an internal Stream-specific - * encryption key provisioned through KMS. - * - * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $customer_managed_encryption_key = null; - /** - * Output only. If the stream was recovered, the time of the last recovery. - * Note: This field is currently experimental. - * - * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_recovery_time = null; - protected $backfill_strategy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The stream's name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the stream. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update time of the stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels. - * @type string $display_name - * Required. Display name. - * @type \Google\Cloud\Datastream\V1\SourceConfig $source_config - * Required. Source connection profile configuration. - * @type \Google\Cloud\Datastream\V1\DestinationConfig $destination_config - * Required. Destination connection profile configuration. - * @type int $state - * The state of the stream. - * @type \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy $backfill_all - * Automatically backfill objects included in the stream source - * configuration. Specific objects can be excluded. - * @type \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy $backfill_none - * Do not automatically backfill any objects. - * @type array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. Errors on the Stream. - * @type string $customer_managed_encryption_key - * Immutable. A reference to a KMS encryption key. - * If provided, it will be used to encrypt the data. - * If left blank, data will be encrypted using an internal Stream-specific - * encryption key provisioned through KMS. - * @type \Google\Protobuf\Timestamp $last_recovery_time - * Output only. If the stream was recovered, the time of the last recovery. - * Note: This field is currently experimental. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The stream's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The stream's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The creation time of the stream. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time of the stream. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update time of the stream. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update time of the stream. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. Source connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\SourceConfig|null - */ - public function getSourceConfig() - { - return $this->source_config; - } - - public function hasSourceConfig() - { - return isset($this->source_config); - } - - public function clearSourceConfig() - { - unset($this->source_config); - } - - /** - * Required. Source connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceConfig source_config = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\SourceConfig $var - * @return $this - */ - public function setSourceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceConfig::class); - $this->source_config = $var; - - return $this; - } - - /** - * Required. Destination connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\DestinationConfig|null - */ - public function getDestinationConfig() - { - return $this->destination_config; - } - - public function hasDestinationConfig() - { - return isset($this->destination_config); - } - - public function clearDestinationConfig() - { - unset($this->destination_config); - } - - /** - * Required. Destination connection profile configuration. - * - * Generated from protobuf field .google.cloud.datastream.v1.DestinationConfig destination_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\DestinationConfig $var - * @return $this - */ - public function setDestinationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\DestinationConfig::class); - $this->destination_config = $var; - - return $this; - } - - /** - * The state of the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.State state = 8; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the stream. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.State state = 8; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\Stream\State::class); - $this->state = $var; - - return $this; - } - - /** - * Automatically backfill objects included in the stream source - * configuration. Specific objects can be excluded. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; - * @return \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy|null - */ - public function getBackfillAll() - { - return $this->readOneof(101); - } - - public function hasBackfillAll() - { - return $this->hasOneof(101); - } - - /** - * Automatically backfill objects included in the stream source - * configuration. Specific objects can be excluded. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101; - * @param \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy $var - * @return $this - */ - public function setBackfillAll($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream\BackfillAllStrategy::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Do not automatically backfill any objects. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; - * @return \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy|null - */ - public function getBackfillNone() - { - return $this->readOneof(102); - } - - public function hasBackfillNone() - { - return $this->hasOneof(102); - } - - /** - * Do not automatically backfill any objects. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102; - * @param \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy $var - * @return $this - */ - public function setBackfillNone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream\BackfillNoneStrategy::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Output only. Errors on the Stream. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. Errors on the Stream. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Error::class); - $this->errors = $arr; - - return $this; - } - - /** - * Immutable. A reference to a KMS encryption key. - * If provided, it will be used to encrypt the data. - * If left blank, data will be encrypted using an internal Stream-specific - * encryption key provisioned through KMS. - * - * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getCustomerManagedEncryptionKey() - { - return isset($this->customer_managed_encryption_key) ? $this->customer_managed_encryption_key : ''; - } - - public function hasCustomerManagedEncryptionKey() - { - return isset($this->customer_managed_encryption_key); - } - - public function clearCustomerManagedEncryptionKey() - { - unset($this->customer_managed_encryption_key); - } - - /** - * Immutable. A reference to a KMS encryption key. - * If provided, it will be used to encrypt the data. - * If left blank, data will be encrypted using an internal Stream-specific - * encryption key provisioned through KMS. - * - * Generated from protobuf field optional string customer_managed_encryption_key = 10 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setCustomerManagedEncryptionKey($var) - { - GPBUtil::checkString($var, True); - $this->customer_managed_encryption_key = $var; - - return $this; - } - - /** - * Output only. If the stream was recovered, the time of the last recovery. - * Note: This field is currently experimental. - * - * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastRecoveryTime() - { - return $this->last_recovery_time; - } - - public function hasLastRecoveryTime() - { - return isset($this->last_recovery_time); - } - - public function clearLastRecoveryTime() - { - unset($this->last_recovery_time); - } - - /** - * Output only. If the stream was recovered, the time of the last recovery. - * Note: This field is currently experimental. - * - * Generated from protobuf field .google.protobuf.Timestamp last_recovery_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastRecoveryTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_recovery_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getBackfillStrategy() - { - return $this->whichOneof("backfill_strategy"); - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php deleted file mode 100644 index c4aff97c35f9..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillAllStrategy.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.datastream.v1.Stream.BackfillAllStrategy - */ -class BackfillAllStrategy extends \Google\Protobuf\Internal\Message -{ - protected $excluded_objects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Datastream\V1\OracleRdbms $oracle_excluded_objects - * Oracle data source objects to avoid backfilling. - * @type \Google\Cloud\Datastream\V1\MysqlRdbms $mysql_excluded_objects - * MySQL data source objects to avoid backfilling. - * @type \Google\Cloud\Datastream\V1\PostgresqlRdbms $postgresql_excluded_objects - * PostgreSQL data source objects to avoid backfilling. - * @type \Google\Cloud\Datastream\V1\SqlServerRdbms $sql_server_excluded_objects - * SQLServer data source objects to avoid backfilling - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Oracle data source objects to avoid backfilling. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; - * @return \Google\Cloud\Datastream\V1\OracleRdbms|null - */ - public function getOracleExcludedObjects() - { - return $this->readOneof(1); - } - - public function hasOracleExcludedObjects() - { - return $this->hasOneof(1); - } - - /** - * Oracle data source objects to avoid backfilling. - * - * Generated from protobuf field .google.cloud.datastream.v1.OracleRdbms oracle_excluded_objects = 1; - * @param \Google\Cloud\Datastream\V1\OracleRdbms $var - * @return $this - */ - public function setOracleExcludedObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\OracleRdbms::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * MySQL data source objects to avoid backfilling. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; - * @return \Google\Cloud\Datastream\V1\MysqlRdbms|null - */ - public function getMysqlExcludedObjects() - { - return $this->readOneof(2); - } - - public function hasMysqlExcludedObjects() - { - return $this->hasOneof(2); - } - - /** - * MySQL data source objects to avoid backfilling. - * - * Generated from protobuf field .google.cloud.datastream.v1.MysqlRdbms mysql_excluded_objects = 2; - * @param \Google\Cloud\Datastream\V1\MysqlRdbms $var - * @return $this - */ - public function setMysqlExcludedObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MysqlRdbms::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * PostgreSQL data source objects to avoid backfilling. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_excluded_objects = 3; - * @return \Google\Cloud\Datastream\V1\PostgresqlRdbms|null - */ - public function getPostgresqlExcludedObjects() - { - return $this->readOneof(3); - } - - public function hasPostgresqlExcludedObjects() - { - return $this->hasOneof(3); - } - - /** - * PostgreSQL data source objects to avoid backfilling. - * - * Generated from protobuf field .google.cloud.datastream.v1.PostgresqlRdbms postgresql_excluded_objects = 3; - * @param \Google\Cloud\Datastream\V1\PostgresqlRdbms $var - * @return $this - */ - public function setPostgresqlExcludedObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\PostgresqlRdbms::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * SQLServer data source objects to avoid backfilling - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_excluded_objects = 4; - * @return \Google\Cloud\Datastream\V1\SqlServerRdbms|null - */ - public function getSqlServerExcludedObjects() - { - return $this->readOneof(4); - } - - public function hasSqlServerExcludedObjects() - { - return $this->hasOneof(4); - } - - /** - * SQLServer data source objects to avoid backfilling - * - * Generated from protobuf field .google.cloud.datastream.v1.SqlServerRdbms sql_server_excluded_objects = 4; - * @param \Google\Cloud\Datastream\V1\SqlServerRdbms $var - * @return $this - */ - public function setSqlServerExcludedObjects($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SqlServerRdbms::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getExcludedObjects() - { - return $this->whichOneof("excluded_objects"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackfillAllStrategy::class, \Google\Cloud\Datastream\V1\Stream_BackfillAllStrategy::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php deleted file mode 100644 index 8cf4fdad74ac..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/BackfillNoneStrategy.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.datastream.v1.Stream.BackfillNoneStrategy - */ -class BackfillNoneStrategy extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackfillNoneStrategy::class, \Google\Cloud\Datastream\V1\Stream_BackfillNoneStrategy::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php deleted file mode 100644 index 12121c22f75b..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Stream/State.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.datastream.v1.Stream.State - */ -class State -{ - /** - * Unspecified stream state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The stream has been created but has not yet started streaming data. - * - * Generated from protobuf enum NOT_STARTED = 1; - */ - const NOT_STARTED = 1; - /** - * The stream is running. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The stream is paused. - * - * Generated from protobuf enum PAUSED = 3; - */ - const PAUSED = 3; - /** - * The stream is in maintenance mode. - * Updates are rejected on the resource in this state. - * - * Generated from protobuf enum MAINTENANCE = 4; - */ - const MAINTENANCE = 4; - /** - * The stream is experiencing an error that is preventing data from being - * streamed. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The stream has experienced a terminal failure. - * - * Generated from protobuf enum FAILED_PERMANENTLY = 6; - */ - const FAILED_PERMANENTLY = 6; - /** - * The stream is starting, but not yet running. - * - * Generated from protobuf enum STARTING = 7; - */ - const STARTING = 7; - /** - * The Stream is no longer reading new events, but still writing events in - * the buffer. - * - * Generated from protobuf enum DRAINING = 8; - */ - const DRAINING = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NOT_STARTED => 'NOT_STARTED', - self::RUNNING => 'RUNNING', - self::PAUSED => 'PAUSED', - self::MAINTENANCE => 'MAINTENANCE', - self::FAILED => 'FAILED', - self::FAILED_PERMANENTLY => 'FAILED_PERMANENTLY', - self::STARTING => 'STARTING', - self::DRAINING => 'DRAINING', - ]; - - 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(State::class, \Google\Cloud\Datastream\V1\Stream_State::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php deleted file mode 100644 index 805c4b7f3313..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/StreamObject.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.datastream.v1.StreamObject - */ -class StreamObject extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The object resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The creation time of the object. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update time of the object. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Output only. Active errors on the object. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $errors; - /** - * The latest backfill job that was initiated for the stream object. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob backfill_job = 7; - */ - protected $backfill_job = null; - /** - * The object identifier in the data source. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object = 8; - */ - protected $source_object = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The object resource's name. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the object. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update time of the object. - * @type string $display_name - * Required. Display name. - * @type array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $errors - * Output only. Active errors on the object. - * @type \Google\Cloud\Datastream\V1\BackfillJob $backfill_job - * The latest backfill job that was initiated for the stream object. - * @type \Google\Cloud\Datastream\V1\SourceObjectIdentifier $source_object - * The object identifier in the data source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The object resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The object resource's name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The creation time of the object. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation time of the object. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update time of the object. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update time of the object. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. Display name. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Active errors on the object. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Output only. Active errors on the object. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Error errors = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Datastream\V1\Error>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Error::class); - $this->errors = $arr; - - return $this; - } - - /** - * The latest backfill job that was initiated for the stream object. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob backfill_job = 7; - * @return \Google\Cloud\Datastream\V1\BackfillJob|null - */ - public function getBackfillJob() - { - return $this->backfill_job; - } - - public function hasBackfillJob() - { - return isset($this->backfill_job); - } - - public function clearBackfillJob() - { - unset($this->backfill_job); - } - - /** - * The latest backfill job that was initiated for the stream object. - * - * Generated from protobuf field .google.cloud.datastream.v1.BackfillJob backfill_job = 7; - * @param \Google\Cloud\Datastream\V1\BackfillJob $var - * @return $this - */ - public function setBackfillJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\BackfillJob::class); - $this->backfill_job = $var; - - return $this; - } - - /** - * The object identifier in the data source. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object = 8; - * @return \Google\Cloud\Datastream\V1\SourceObjectIdentifier|null - */ - public function getSourceObject() - { - return $this->source_object; - } - - public function hasSourceObject() - { - return isset($this->source_object); - } - - public function clearSourceObject() - { - unset($this->source_object); - } - - /** - * The object identifier in the data source. - * - * Generated from protobuf field .google.cloud.datastream.v1.SourceObjectIdentifier source_object = 8; - * @param \Google\Cloud\Datastream\V1\SourceObjectIdentifier $var - * @return $this - */ - public function setSourceObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\SourceObjectIdentifier::class); - $this->source_object = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php deleted file mode 100644 index d6e2b2bb9165..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateConnectionProfileRequest.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.datastream.v1.UpdateConnectionProfileRequest - */ -class UpdateConnectionProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The connection profile to update. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $connection_profile = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Only validate the connection profile, but don't update any - * resources. The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. Update the connection profile without validating it. - * - * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param \Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile Required. The connection profile to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\Datastream\V1\UpdateConnectionProfileRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Datastream\V1\ConnectionProfile $connectionProfile, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setConnectionProfile($connectionProfile) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\Datastream\V1\ConnectionProfile $connection_profile - * Required. The connection profile to update. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. Only validate the connection profile, but don't update any - * resources. The default is false. - * @type bool $force - * Optional. Update the connection profile without validating it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ConnectionProfile resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The connection profile to update. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\ConnectionProfile|null - */ - public function getConnectionProfile() - { - return $this->connection_profile; - } - - public function hasConnectionProfile() - { - return isset($this->connection_profile); - } - - public function clearConnectionProfile() - { - unset($this->connection_profile); - } - - /** - * Required. The connection profile to update. - * - * Generated from protobuf field .google.cloud.datastream.v1.ConnectionProfile connection_profile = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\ConnectionProfile $var - * @return $this - */ - public function setConnectionProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\ConnectionProfile::class); - $this->connection_profile = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Only validate the connection profile, but don't update any - * resources. The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the connection profile, but don't update any - * resources. The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. Update the connection profile without validating it. - * - * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. Update the connection profile without validating it. - * - * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php deleted file mode 100644 index 235e805ef9b5..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/UpdateStreamRequest.php +++ /dev/null @@ -1,302 +0,0 @@ -google.cloud.datastream.v1.UpdateStreamRequest - */ -class UpdateStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The stream resource to update. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Only validate the stream with the changes, without actually - * updating it. The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. Update the stream without validating it. - * - * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param \Google\Cloud\Datastream\V1\Stream $stream Required. The stream resource to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\Datastream\V1\UpdateStreamRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Datastream\V1\Stream $stream, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setStream($stream) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\Datastream\V1\Stream $stream - * Required. The stream resource to update. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $validate_only - * Optional. Only validate the stream with the changes, without actually - * updating it. The default is false. - * @type bool $force - * Optional. Update the stream without validating it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\Datastream::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The stream resource to update. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Datastream\V1\Stream|null - */ - public function getStream() - { - return $this->stream; - } - - public function hasStream() - { - return isset($this->stream); - } - - public function clearStream() - { - unset($this->stream); - } - - /** - * Required. The stream resource to update. - * - * Generated from protobuf field .google.cloud.datastream.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Datastream\V1\Stream $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\Stream::class); - $this->stream = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Only validate the stream with the changes, without actually - * updating it. The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. Only validate the stream with the changes, without actually - * updating it. The default is false. - * - * Generated from protobuf field bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. Update the stream without validating it. - * - * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. Update the stream without validating it. - * - * Generated from protobuf field bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php deleted file mode 100644 index 886455b085ce..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.datastream.v1.Validation - */ -class Validation extends \Google\Protobuf\Internal\Message -{ - /** - * A short description of the validation. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * Output only. Validation execution status. - * - * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Messages reflecting the validation results. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.ValidationMessage message = 3; - */ - private $message; - /** - * A custom code identifying this validation. - * - * Generated from protobuf field string code = 4; - */ - protected $code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $description - * A short description of the validation. - * @type int $state - * Output only. Validation execution status. - * @type array<\Google\Cloud\Datastream\V1\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $message - * Messages reflecting the validation results. - * @type string $code - * A custom code identifying this validation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * A short description of the validation. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A short description of the validation. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Validation execution status. - * - * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Validation execution status. - * - * Generated from protobuf field .google.cloud.datastream.v1.Validation.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\Validation\State::class); - $this->state = $var; - - return $this; - } - - /** - * Messages reflecting the validation results. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.ValidationMessage message = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessage() - { - return $this->message; - } - - /** - * Messages reflecting the validation results. - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.ValidationMessage message = 3; - * @param array<\Google\Cloud\Datastream\V1\ValidationMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessage($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\ValidationMessage::class); - $this->message = $arr; - - return $this; - } - - /** - * A custom code identifying this validation. - * - * Generated from protobuf field string code = 4; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * A custom code identifying this validation. - * - * Generated from protobuf field string code = 4; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php deleted file mode 100644 index e969926775bf..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/Validation/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.datastream.v1.Validation.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Validation did not execute. - * - * Generated from protobuf enum NOT_EXECUTED = 1; - */ - const NOT_EXECUTED = 1; - /** - * Validation failed. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - /** - * Validation passed. - * - * Generated from protobuf enum PASSED = 3; - */ - const PASSED = 3; - /** - * Validation executed with warnings. - * - * Generated from protobuf enum WARNING = 4; - */ - const WARNING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::NOT_EXECUTED => 'NOT_EXECUTED', - self::FAILED => 'FAILED', - self::PASSED => 'PASSED', - self::WARNING => 'WARNING', - ]; - - 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(State::class, \Google\Cloud\Datastream\V1\Validation_State::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php deleted file mode 100644 index 4df97c6e6bcd..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.datastream.v1.ValidationMessage - */ -class ValidationMessage extends \Google\Protobuf\Internal\Message -{ - /** - * The result of the validation. - * - * Generated from protobuf field string message = 1; - */ - protected $message = ''; - /** - * Message severity level (warning or error). - * - * Generated from protobuf field .google.cloud.datastream.v1.ValidationMessage.Level level = 2; - */ - protected $level = 0; - /** - * Additional metadata related to the result. - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - /** - * A custom code identifying this specific message. - * - * Generated from protobuf field string code = 4; - */ - protected $code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $message - * The result of the validation. - * @type int $level - * Message severity level (warning or error). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Additional metadata related to the result. - * @type string $code - * A custom code identifying this specific message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * The result of the validation. - * - * Generated from protobuf field string message = 1; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The result of the validation. - * - * Generated from protobuf field string message = 1; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Message severity level (warning or error). - * - * Generated from protobuf field .google.cloud.datastream.v1.ValidationMessage.Level level = 2; - * @return int - */ - public function getLevel() - { - return $this->level; - } - - /** - * Message severity level (warning or error). - * - * Generated from protobuf field .google.cloud.datastream.v1.ValidationMessage.Level level = 2; - * @param int $var - * @return $this - */ - public function setLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Datastream\V1\ValidationMessage\Level::class); - $this->level = $var; - - return $this; - } - - /** - * Additional metadata related to the result. - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Additional metadata related to the result. - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * A custom code identifying this specific message. - * - * Generated from protobuf field string code = 4; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * A custom code identifying this specific message. - * - * Generated from protobuf field string code = 4; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php deleted file mode 100644 index e40c2003005a..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationMessage/Level.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.datastream.v1.ValidationMessage.Level - */ -class Level -{ - /** - * Unspecified level. - * - * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; - */ - const LEVEL_UNSPECIFIED = 0; - /** - * Potentially cause issues with the Stream. - * - * Generated from protobuf enum WARNING = 1; - */ - const WARNING = 1; - /** - * Definitely cause issues with the Stream. - * - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; - - private static $valueToName = [ - self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - ]; - - 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(Level::class, \Google\Cloud\Datastream\V1\ValidationMessage_Level::class); - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php deleted file mode 100644 index c17ce32c88f4..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/ValidationResult.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.datastream.v1.ValidationResult - */ -class ValidationResult extends \Google\Protobuf\Internal\Message -{ - /** - * A list of validations (includes both executed as well as not executed - * validations). - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Validation validations = 1; - */ - private $validations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Datastream\V1\Validation>|\Google\Protobuf\Internal\RepeatedField $validations - * A list of validations (includes both executed as well as not executed - * validations). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * A list of validations (includes both executed as well as not executed - * validations). - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Validation validations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidations() - { - return $this->validations; - } - - /** - * A list of validations (includes both executed as well as not executed - * validations). - * - * Generated from protobuf field repeated .google.cloud.datastream.v1.Validation validations = 1; - * @param array<\Google\Cloud\Datastream\V1\Validation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Validation::class); - $this->validations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php b/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php deleted file mode 100644 index 93986c4ac644..000000000000 --- a/owl-bot-staging/Datastream/v1/proto/src/Google/Cloud/Datastream/V1/VpcPeeringConfig.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.datastream.v1.VpcPeeringConfig - */ -class VpcPeeringConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified name of the VPC that Datastream will peer to. - * Format: `projects/{project}/global/{networks}/{name}` - * - * Generated from protobuf field string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $vpc = ''; - /** - * Required. A free subnet for peering. (CIDR of /29) - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vpc - * Required. Fully qualified name of the VPC that Datastream will peer to. - * Format: `projects/{project}/global/{networks}/{name}` - * @type string $subnet - * Required. A free subnet for peering. (CIDR of /29) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified name of the VPC that Datastream will peer to. - * Format: `projects/{project}/global/{networks}/{name}` - * - * Generated from protobuf field string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getVpc() - { - return $this->vpc; - } - - /** - * Required. Fully qualified name of the VPC that Datastream will peer to. - * Format: `projects/{project}/global/{networks}/{name}` - * - * Generated from protobuf field string vpc = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpc($var) - { - GPBUtil::checkString($var, True); - $this->vpc = $var; - - return $this; - } - - /** - * Required. A free subnet for peering. (CIDR of /29) - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * Required. A free subnet for peering. (CIDR of /29) - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php deleted file mode 100644 index 21c444d506e3..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_connection_profile.php +++ /dev/null @@ -1,98 +0,0 @@ -setDisplayName($connectionProfileDisplayName); - $request = (new CreateConnectionProfileRequest()) - ->setParent($formattedParent) - ->setConnectionProfileId($connectionProfileId) - ->setConnectionProfile($connectionProfile); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->createConnectionProfile($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectionProfile $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - $connectionProfileId = '[CONNECTION_PROFILE_ID]'; - $connectionProfileDisplayName = '[DISPLAY_NAME]'; - - create_connection_profile_sample( - $formattedParent, - $connectionProfileId, - $connectionProfileDisplayName - ); -} -// [END datastream_v1_generated_Datastream_CreateConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php deleted file mode 100644 index db8c0f65a57a..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_private_connection.php +++ /dev/null @@ -1,98 +0,0 @@ -setDisplayName($privateConnectionDisplayName); - $request = (new CreatePrivateConnectionRequest()) - ->setParent($formattedParent) - ->setPrivateConnectionId($privateConnectionId) - ->setPrivateConnection($privateConnection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->createPrivateConnection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PrivateConnection $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - $privateConnectionId = '[PRIVATE_CONNECTION_ID]'; - $privateConnectionDisplayName = '[DISPLAY_NAME]'; - - create_private_connection_sample( - $formattedParent, - $privateConnectionId, - $privateConnectionDisplayName - ); -} -// [END datastream_v1_generated_Datastream_CreatePrivateConnection_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php deleted file mode 100644 index 9b74411b98ea..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_route.php +++ /dev/null @@ -1,103 +0,0 @@ -setDisplayName($routeDisplayName) - ->setDestinationAddress($routeDestinationAddress); - $request = (new CreateRouteRequest()) - ->setParent($formattedParent) - ->setRouteId($routeId) - ->setRoute($route); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->createRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Route $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - $routeId = '[ROUTE_ID]'; - $routeDisplayName = '[DISPLAY_NAME]'; - $routeDestinationAddress = '[DESTINATION_ADDRESS]'; - - create_route_sample($formattedParent, $routeId, $routeDisplayName, $routeDestinationAddress); -} -// [END datastream_v1_generated_Datastream_CreateRoute_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php deleted file mode 100644 index 17d2cefb9bb5..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/create_stream.php +++ /dev/null @@ -1,126 +0,0 @@ -setSourceConnectionProfile($formattedStreamSourceConfigSourceConnectionProfile); - $streamDestinationConfig = (new DestinationConfig()) - ->setDestinationConnectionProfile($formattedStreamDestinationConfigDestinationConnectionProfile); - $stream = (new Stream()) - ->setDisplayName($streamDisplayName) - ->setSourceConfig($streamSourceConfig) - ->setDestinationConfig($streamDestinationConfig); - $request = (new CreateStreamRequest()) - ->setParent($formattedParent) - ->setStreamId($streamId) - ->setStream($stream); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->createStream($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Stream $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - $streamId = '[STREAM_ID]'; - $streamDisplayName = '[DISPLAY_NAME]'; - $formattedStreamSourceConfigSourceConnectionProfile = DatastreamClient::connectionProfileName( - '[PROJECT]', - '[LOCATION]', - '[CONNECTION_PROFILE]' - ); - $formattedStreamDestinationConfigDestinationConnectionProfile = DatastreamClient::connectionProfileName( - '[PROJECT]', - '[LOCATION]', - '[CONNECTION_PROFILE]' - ); - - create_stream_sample( - $formattedParent, - $streamId, - $streamDisplayName, - $formattedStreamSourceConfigSourceConnectionProfile, - $formattedStreamDestinationConfigDestinationConnectionProfile - ); -} -// [END datastream_v1_generated_Datastream_CreateStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php deleted file mode 100644 index e2f6b8b2a0a8..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_connection_profile.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->deleteConnectionProfile($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::connectionProfileName( - '[PROJECT]', - '[LOCATION]', - '[CONNECTION_PROFILE]' - ); - - delete_connection_profile_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_DeleteConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php deleted file mode 100644 index be9173aee336..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_private_connection.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->deletePrivateConnection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - - delete_private_connection_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_DeletePrivateConnection_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php deleted file mode 100644 index 73fd0f93e154..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_route.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->deleteRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::routeName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]', - '[ROUTE]' - ); - - delete_route_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_DeleteRoute_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php deleted file mode 100644 index 9ee89c2896b5..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/delete_stream.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->deleteStream($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - - delete_stream_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_DeleteStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php deleted file mode 100644 index 5fd7a5bb7a00..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/discover_connection_profile.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var DiscoverConnectionProfileResponse $response */ - $response = $datastreamClient->discoverConnectionProfile($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 -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - - discover_connection_profile_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_DiscoverConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php deleted file mode 100644 index 9c269976762f..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/fetch_static_ips.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $datastreamClient->fetchStaticIps($request); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - - fetch_static_ips_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_FetchStaticIps_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php deleted file mode 100644 index f410a32e1bc3..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_connection_profile.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ConnectionProfile $response */ - $response = $datastreamClient->getConnectionProfile($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::connectionProfileName( - '[PROJECT]', - '[LOCATION]', - '[CONNECTION_PROFILE]' - ); - - get_connection_profile_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_GetConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php deleted file mode 100644 index 3dc7fbe2e4b0..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datastream_v1_generated_Datastream_GetLocation_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php deleted file mode 100644 index 16622f367b9c..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_private_connection.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PrivateConnection $response */ - $response = $datastreamClient->getPrivateConnection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - - get_private_connection_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_GetPrivateConnection_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php deleted file mode 100644 index c4c53de13362..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_route.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Route $response */ - $response = $datastreamClient->getRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::routeName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]', - '[ROUTE]' - ); - - get_route_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_GetRoute_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php deleted file mode 100644 index e34244b81fa7..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Stream $response */ - $response = $datastreamClient->getStream($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - - get_stream_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_GetStream_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php deleted file mode 100644 index 914124fba458..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/get_stream_object.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var StreamObject $response */ - $response = $datastreamClient->getStreamObject($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DatastreamClient::streamObjectName( - '[PROJECT]', - '[LOCATION]', - '[STREAM]', - '[OBJECT]' - ); - - get_stream_object_sample($formattedName); -} -// [END datastream_v1_generated_Datastream_GetStreamObject_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php deleted file mode 100644 index 6cc49a75ef30..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_connection_profiles.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $datastreamClient->listConnectionProfiles($request); - - /** @var ConnectionProfile $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - - list_connection_profiles_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_ListConnectionProfiles_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php deleted file mode 100644 index 3155f28cc6b5..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END datastream_v1_generated_Datastream_ListLocations_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php deleted file mode 100644 index c66fd4a230f1..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_private_connections.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $datastreamClient->listPrivateConnections($request); - - /** @var PrivateConnection $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - - list_private_connections_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_ListPrivateConnections_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php deleted file mode 100644 index f5d4157e6459..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_routes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $datastreamClient->listRoutes($request); - - /** @var Route $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::privateConnectionName( - '[PROJECT]', - '[LOCATION]', - '[PRIVATE_CONNECTION]' - ); - - list_routes_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_ListRoutes_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php deleted file mode 100644 index 32750d183eff..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_stream_objects.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $datastreamClient->listStreamObjects($request); - - /** @var StreamObject $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - - list_stream_objects_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_ListStreamObjects_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php deleted file mode 100644 index f6d38f9c1db0..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/list_streams.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $datastreamClient->listStreams($request); - - /** @var Stream $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DatastreamClient::locationName('[PROJECT]', '[LOCATION]'); - - list_streams_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_ListStreams_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php deleted file mode 100644 index a3bf962751d0..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/lookup_stream_object.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setSourceObjectIdentifier($sourceObjectIdentifier); - - // Call the API and handle any network failures. - try { - /** @var StreamObject $response */ - $response = $datastreamClient->lookupStreamObject($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 -{ - $formattedParent = DatastreamClient::streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - - lookup_stream_object_sample($formattedParent); -} -// [END datastream_v1_generated_Datastream_LookupStreamObject_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php deleted file mode 100644 index 0deeccf24b74..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/start_backfill_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setObject($formattedObject); - - // Call the API and handle any network failures. - try { - /** @var StartBackfillJobResponse $response */ - $response = $datastreamClient->startBackfillJob($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 -{ - $formattedObject = DatastreamClient::streamObjectName( - '[PROJECT]', - '[LOCATION]', - '[STREAM]', - '[OBJECT]' - ); - - start_backfill_job_sample($formattedObject); -} -// [END datastream_v1_generated_Datastream_StartBackfillJob_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php deleted file mode 100644 index 2c877988f76c..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/stop_backfill_job.php +++ /dev/null @@ -1,77 +0,0 @@ -setObject($formattedObject); - - // Call the API and handle any network failures. - try { - /** @var StopBackfillJobResponse $response */ - $response = $datastreamClient->stopBackfillJob($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 -{ - $formattedObject = DatastreamClient::streamObjectName( - '[PROJECT]', - '[LOCATION]', - '[STREAM]', - '[OBJECT]' - ); - - stop_backfill_job_sample($formattedObject); -} -// [END datastream_v1_generated_Datastream_StopBackfillJob_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php deleted file mode 100644 index baa5c99dad93..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_connection_profile.php +++ /dev/null @@ -1,84 +0,0 @@ -setDisplayName($connectionProfileDisplayName); - $request = (new UpdateConnectionProfileRequest()) - ->setConnectionProfile($connectionProfile); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->updateConnectionProfile($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectionProfile $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $connectionProfileDisplayName = '[DISPLAY_NAME]'; - - update_connection_profile_sample($connectionProfileDisplayName); -} -// [END datastream_v1_generated_Datastream_UpdateConnectionProfile_sync] diff --git a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php b/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php deleted file mode 100644 index a81b5050f31e..000000000000 --- a/owl-bot-staging/Datastream/v1/samples/V1/DatastreamClient/update_stream.php +++ /dev/null @@ -1,115 +0,0 @@ -setSourceConnectionProfile($formattedStreamSourceConfigSourceConnectionProfile); - $streamDestinationConfig = (new DestinationConfig()) - ->setDestinationConnectionProfile($formattedStreamDestinationConfigDestinationConnectionProfile); - $stream = (new Stream()) - ->setDisplayName($streamDisplayName) - ->setSourceConfig($streamSourceConfig) - ->setDestinationConfig($streamDestinationConfig); - $request = (new UpdateStreamRequest()) - ->setStream($stream); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $datastreamClient->updateStream($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Stream $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $streamDisplayName = '[DISPLAY_NAME]'; - $formattedStreamSourceConfigSourceConnectionProfile = DatastreamClient::connectionProfileName( - '[PROJECT]', - '[LOCATION]', - '[CONNECTION_PROFILE]' - ); - $formattedStreamDestinationConfigDestinationConnectionProfile = DatastreamClient::connectionProfileName( - '[PROJECT]', - '[LOCATION]', - '[CONNECTION_PROFILE]' - ); - - update_stream_sample( - $streamDisplayName, - $formattedStreamSourceConfigSourceConnectionProfile, - $formattedStreamDestinationConfigDestinationConnectionProfile - ); -} -// [END datastream_v1_generated_Datastream_UpdateStream_sync] diff --git a/owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php b/owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php deleted file mode 100644 index 8b42de9733c5..000000000000 --- a/owl-bot-staging/Datastream/v1/src/V1/Client/DatastreamClient.php +++ /dev/null @@ -1,1187 +0,0 @@ - createConnectionProfileAsync(CreateConnectionProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPrivateConnectionAsync(CreatePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createRouteAsync(CreateRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface createStreamAsync(CreateStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConnectionProfileAsync(DeleteConnectionProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePrivateConnectionAsync(DeletePrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteRouteAsync(DeleteRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteStreamAsync(DeleteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface discoverConnectionProfileAsync(DiscoverConnectionProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchStaticIpsAsync(FetchStaticIpsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectionProfileAsync(GetConnectionProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPrivateConnectionAsync(GetPrivateConnectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRouteAsync(GetRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStreamAsync(GetStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStreamObjectAsync(GetStreamObjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConnectionProfilesAsync(ListConnectionProfilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrivateConnectionsAsync(ListPrivateConnectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRoutesAsync(ListRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listStreamObjectsAsync(ListStreamObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listStreamsAsync(ListStreamsRequest $request, array $optionalArgs = []) - * @method PromiseInterface lookupStreamObjectAsync(LookupStreamObjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface runStreamAsync(RunStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface startBackfillJobAsync(StartBackfillJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopBackfillJobAsync(StopBackfillJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateConnectionProfileAsync(UpdateConnectionProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateStreamAsync(UpdateStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class DatastreamClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.datastream.v1.Datastream'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'datastream.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'datastream.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/datastream_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/datastream_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/datastream_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/datastream_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * connection_profile resource. - * - * @param string $project - * @param string $location - * @param string $connectionProfile - * - * @return string The formatted connection_profile resource. - */ - public static function connectionProfileName(string $project, string $location, string $connectionProfile): string - { - return self::getPathTemplate('connectionProfile')->render([ - 'project' => $project, - 'location' => $location, - 'connection_profile' => $connectionProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a networks - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted networks resource. - */ - public static function networksName(string $project, string $network): string - { - return self::getPathTemplate('networks')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * private_connection resource. - * - * @param string $project - * @param string $location - * @param string $privateConnection - * - * @return string The formatted private_connection resource. - */ - public static function privateConnectionName(string $project, string $location, string $privateConnection): string - { - return self::getPathTemplate('privateConnection')->render([ - 'project' => $project, - 'location' => $location, - 'private_connection' => $privateConnection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a route - * resource. - * - * @param string $project - * @param string $location - * @param string $privateConnection - * @param string $route - * - * @return string The formatted route resource. - */ - public static function routeName(string $project, string $location, string $privateConnection, string $route): string - { - return self::getPathTemplate('route')->render([ - 'project' => $project, - 'location' => $location, - 'private_connection' => $privateConnection, - 'route' => $route, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a stream - * resource. - * - * @param string $project - * @param string $location - * @param string $stream - * - * @return string The formatted stream resource. - */ - public static function streamName(string $project, string $location, string $stream): string - { - return self::getPathTemplate('stream')->render([ - 'project' => $project, - 'location' => $location, - 'stream' => $stream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * stream_object resource. - * - * @param string $project - * @param string $location - * @param string $stream - * @param string $object - * - * @return string The formatted stream_object resource. - */ - public static function streamObjectName(string $project, string $location, string $stream, string $object): string - { - return self::getPathTemplate('streamObject')->render([ - 'project' => $project, - 'location' => $location, - 'stream' => $stream, - 'object' => $object, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connectionProfile: projects/{project}/locations/{location}/connectionProfiles/{connection_profile} - * - location: projects/{project}/locations/{location} - * - networks: projects/{project}/global/networks/{network} - * - privateConnection: projects/{project}/locations/{location}/privateConnections/{private_connection} - * - route: projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route} - * - stream: projects/{project}/locations/{location}/streams/{stream} - * - streamObject: projects/{project}/locations/{location}/streams/{stream}/objects/{object} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $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 'datastream.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); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Use this method to create a connection profile in a project and location. - * - * The async variant is {@see DatastreamClient::createConnectionProfileAsync()} . - * - * @example samples/V1/DatastreamClient/create_connection_profile.php - * - * @param CreateConnectionProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createConnectionProfile(CreateConnectionProfileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateConnectionProfile', $request, $callOptions)->wait(); - } - - /** - * Use this method to create a private connectivity configuration. - * - * The async variant is {@see DatastreamClient::createPrivateConnectionAsync()} . - * - * @example samples/V1/DatastreamClient/create_private_connection.php - * - * @param CreatePrivateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPrivateConnection(CreatePrivateConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Use this method to create a route for a private connectivity configuration - * in a project and location. - * - * The async variant is {@see DatastreamClient::createRouteAsync()} . - * - * @example samples/V1/DatastreamClient/create_route.php - * - * @param CreateRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createRoute(CreateRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateRoute', $request, $callOptions)->wait(); - } - - /** - * Use this method to create a stream. - * - * The async variant is {@see DatastreamClient::createStreamAsync()} . - * - * @example samples/V1/DatastreamClient/create_stream.php - * - * @param CreateStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createStream(CreateStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateStream', $request, $callOptions)->wait(); - } - - /** - * Use this method to delete a connection profile. - * - * The async variant is {@see DatastreamClient::deleteConnectionProfileAsync()} . - * - * @example samples/V1/DatastreamClient/delete_connection_profile.php - * - * @param DeleteConnectionProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteConnectionProfile(DeleteConnectionProfileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteConnectionProfile', $request, $callOptions)->wait(); - } - - /** - * Use this method to delete a private connectivity configuration. - * - * The async variant is {@see DatastreamClient::deletePrivateConnectionAsync()} . - * - * @example samples/V1/DatastreamClient/delete_private_connection.php - * - * @param DeletePrivateConnectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePrivateConnection(DeletePrivateConnectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Use this method to delete a route. - * - * The async variant is {@see DatastreamClient::deleteRouteAsync()} . - * - * @example samples/V1/DatastreamClient/delete_route.php - * - * @param DeleteRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteRoute(DeleteRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteRoute', $request, $callOptions)->wait(); - } - - /** - * Use this method to delete a stream. - * - * The async variant is {@see DatastreamClient::deleteStreamAsync()} . - * - * @example samples/V1/DatastreamClient/delete_stream.php - * - * @param DeleteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteStream(DeleteStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteStream', $request, $callOptions)->wait(); - } - - /** - * Use this method to discover a connection profile. - * The discover API call exposes the data objects and metadata belonging to - * the profile. Typically, a request returns children data objects of a - * parent data object that's optionally supplied in the request. - * - * The async variant is {@see DatastreamClient::discoverConnectionProfileAsync()} . - * - * @example samples/V1/DatastreamClient/discover_connection_profile.php - * - * @param DiscoverConnectionProfileRequest $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 DiscoverConnectionProfileResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function discoverConnectionProfile(DiscoverConnectionProfileRequest $request, array $callOptions = []): DiscoverConnectionProfileResponse - { - return $this->startApiCall('DiscoverConnectionProfile', $request, $callOptions)->wait(); - } - - /** - * The FetchStaticIps API call exposes the static IP addresses used by - * Datastream. - * - * The async variant is {@see DatastreamClient::fetchStaticIpsAsync()} . - * - * @example samples/V1/DatastreamClient/fetch_static_ips.php - * - * @param FetchStaticIpsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchStaticIps(FetchStaticIpsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('FetchStaticIps', $request, $callOptions); - } - - /** - * Use this method to get details about a connection profile. - * - * The async variant is {@see DatastreamClient::getConnectionProfileAsync()} . - * - * @example samples/V1/DatastreamClient/get_connection_profile.php - * - * @param GetConnectionProfileRequest $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 ConnectionProfile - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConnectionProfile(GetConnectionProfileRequest $request, array $callOptions = []): ConnectionProfile - { - return $this->startApiCall('GetConnectionProfile', $request, $callOptions)->wait(); - } - - /** - * Use this method to get details about a private connectivity configuration. - * - * The async variant is {@see DatastreamClient::getPrivateConnectionAsync()} . - * - * @example samples/V1/DatastreamClient/get_private_connection.php - * - * @param GetPrivateConnectionRequest $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 PrivateConnection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPrivateConnection(GetPrivateConnectionRequest $request, array $callOptions = []): PrivateConnection - { - return $this->startApiCall('GetPrivateConnection', $request, $callOptions)->wait(); - } - - /** - * Use this method to get details about a route. - * - * The async variant is {@see DatastreamClient::getRouteAsync()} . - * - * @example samples/V1/DatastreamClient/get_route.php - * - * @param GetRouteRequest $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 Route - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRoute(GetRouteRequest $request, array $callOptions = []): Route - { - return $this->startApiCall('GetRoute', $request, $callOptions)->wait(); - } - - /** - * Use this method to get details about a stream. - * - * The async variant is {@see DatastreamClient::getStreamAsync()} . - * - * @example samples/V1/DatastreamClient/get_stream.php - * - * @param GetStreamRequest $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 Stream - * - * @throws ApiException Thrown if the API call fails. - */ - public function getStream(GetStreamRequest $request, array $callOptions = []): Stream - { - return $this->startApiCall('GetStream', $request, $callOptions)->wait(); - } - - /** - * Use this method to get details about a stream object. - * - * The async variant is {@see DatastreamClient::getStreamObjectAsync()} . - * - * @example samples/V1/DatastreamClient/get_stream_object.php - * - * @param GetStreamObjectRequest $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 StreamObject - * - * @throws ApiException Thrown if the API call fails. - */ - public function getStreamObject(GetStreamObjectRequest $request, array $callOptions = []): StreamObject - { - return $this->startApiCall('GetStreamObject', $request, $callOptions)->wait(); - } - - /** - * Use this method to list connection profiles created in a project and - * location. - * - * The async variant is {@see DatastreamClient::listConnectionProfilesAsync()} . - * - * @example samples/V1/DatastreamClient/list_connection_profiles.php - * - * @param ListConnectionProfilesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listConnectionProfiles(ListConnectionProfilesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConnectionProfiles', $request, $callOptions); - } - - /** - * Use this method to list private connectivity configurations in a project - * and location. - * - * The async variant is {@see DatastreamClient::listPrivateConnectionsAsync()} . - * - * @example samples/V1/DatastreamClient/list_private_connections.php - * - * @param ListPrivateConnectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPrivateConnections(ListPrivateConnectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPrivateConnections', $request, $callOptions); - } - - /** - * Use this method to list routes created for a private connectivity - * configuration in a project and location. - * - * The async variant is {@see DatastreamClient::listRoutesAsync()} . - * - * @example samples/V1/DatastreamClient/list_routes.php - * - * @param ListRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRoutes(ListRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRoutes', $request, $callOptions); - } - - /** - * Use this method to list the objects of a specific stream. - * - * The async variant is {@see DatastreamClient::listStreamObjectsAsync()} . - * - * @example samples/V1/DatastreamClient/list_stream_objects.php - * - * @param ListStreamObjectsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listStreamObjects(ListStreamObjectsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListStreamObjects', $request, $callOptions); - } - - /** - * Use this method to list streams in a project and location. - * - * The async variant is {@see DatastreamClient::listStreamsAsync()} . - * - * @example samples/V1/DatastreamClient/list_streams.php - * - * @param ListStreamsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listStreams(ListStreamsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListStreams', $request, $callOptions); - } - - /** - * Use this method to look up a stream object by its source object identifier. - * - * The async variant is {@see DatastreamClient::lookupStreamObjectAsync()} . - * - * @example samples/V1/DatastreamClient/lookup_stream_object.php - * - * @param LookupStreamObjectRequest $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 StreamObject - * - * @throws ApiException Thrown if the API call fails. - */ - public function lookupStreamObject(LookupStreamObjectRequest $request, array $callOptions = []): StreamObject - { - return $this->startApiCall('LookupStreamObject', $request, $callOptions)->wait(); - } - - /** - * Use this method to start, resume or recover a stream with a non default CDC - * strategy. - * - * The async variant is {@see DatastreamClient::runStreamAsync()} . - * - * @example samples/V1/DatastreamClient/run_stream.php - * - * @param RunStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runStream(RunStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunStream', $request, $callOptions)->wait(); - } - - /** - * Use this method to start a backfill job for the specified stream object. - * - * The async variant is {@see DatastreamClient::startBackfillJobAsync()} . - * - * @example samples/V1/DatastreamClient/start_backfill_job.php - * - * @param StartBackfillJobRequest $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 StartBackfillJobResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startBackfillJob(StartBackfillJobRequest $request, array $callOptions = []): StartBackfillJobResponse - { - return $this->startApiCall('StartBackfillJob', $request, $callOptions)->wait(); - } - - /** - * Use this method to stop a backfill job for the specified stream object. - * - * The async variant is {@see DatastreamClient::stopBackfillJobAsync()} . - * - * @example samples/V1/DatastreamClient/stop_backfill_job.php - * - * @param StopBackfillJobRequest $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 StopBackfillJobResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopBackfillJob(StopBackfillJobRequest $request, array $callOptions = []): StopBackfillJobResponse - { - return $this->startApiCall('StopBackfillJob', $request, $callOptions)->wait(); - } - - /** - * Use this method to update the parameters of a connection profile. - * - * The async variant is {@see DatastreamClient::updateConnectionProfileAsync()} . - * - * @example samples/V1/DatastreamClient/update_connection_profile.php - * - * @param UpdateConnectionProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateConnectionProfile(UpdateConnectionProfileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateConnectionProfile', $request, $callOptions)->wait(); - } - - /** - * Use this method to update the configuration of a stream. - * - * The async variant is {@see DatastreamClient::updateStreamAsync()} . - * - * @example samples/V1/DatastreamClient/update_stream.php - * - * @param UpdateStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateStream(UpdateStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateStream', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DatastreamClient::getLocationAsync()} . - * - * @example samples/V1/DatastreamClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DatastreamClient::listLocationsAsync()} . - * - * @example samples/V1/DatastreamClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 3246246ddfcc..000000000000 --- a/owl-bot-staging/Datastream/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.datastream.v1", - "libraryPackage": "Google\\Cloud\\Datastream\\V1", - "services": { - "Datastream": { - "clients": { - "grpc": { - "libraryClient": "DatastreamGapicClient", - "rpcs": { - "CreateConnectionProfile": { - "methods": [ - "createConnectionProfile" - ] - }, - "CreatePrivateConnection": { - "methods": [ - "createPrivateConnection" - ] - }, - "CreateRoute": { - "methods": [ - "createRoute" - ] - }, - "CreateStream": { - "methods": [ - "createStream" - ] - }, - "DeleteConnectionProfile": { - "methods": [ - "deleteConnectionProfile" - ] - }, - "DeletePrivateConnection": { - "methods": [ - "deletePrivateConnection" - ] - }, - "DeleteRoute": { - "methods": [ - "deleteRoute" - ] - }, - "DeleteStream": { - "methods": [ - "deleteStream" - ] - }, - "DiscoverConnectionProfile": { - "methods": [ - "discoverConnectionProfile" - ] - }, - "FetchStaticIps": { - "methods": [ - "fetchStaticIps" - ] - }, - "GetConnectionProfile": { - "methods": [ - "getConnectionProfile" - ] - }, - "GetPrivateConnection": { - "methods": [ - "getPrivateConnection" - ] - }, - "GetRoute": { - "methods": [ - "getRoute" - ] - }, - "GetStream": { - "methods": [ - "getStream" - ] - }, - "GetStreamObject": { - "methods": [ - "getStreamObject" - ] - }, - "ListConnectionProfiles": { - "methods": [ - "listConnectionProfiles" - ] - }, - "ListPrivateConnections": { - "methods": [ - "listPrivateConnections" - ] - }, - "ListRoutes": { - "methods": [ - "listRoutes" - ] - }, - "ListStreamObjects": { - "methods": [ - "listStreamObjects" - ] - }, - "ListStreams": { - "methods": [ - "listStreams" - ] - }, - "LookupStreamObject": { - "methods": [ - "lookupStreamObject" - ] - }, - "RunStream": { - "methods": [ - "runStream" - ] - }, - "StartBackfillJob": { - "methods": [ - "startBackfillJob" - ] - }, - "StopBackfillJob": { - "methods": [ - "stopBackfillJob" - ] - }, - "UpdateConnectionProfile": { - "methods": [ - "updateConnectionProfile" - ] - }, - "UpdateStream": { - "methods": [ - "updateStream" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json deleted file mode 100644 index 78c6b53a17dd..000000000000 --- a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_client_config.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "interfaces": { - "google.cloud.datastream.v1.Datastream": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreatePrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeletePrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DiscoverConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "FetchStaticIps": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPrivateConnection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRoute": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetStream": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetStreamObject": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConnectionProfiles": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPrivateConnections": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListStreamObjects": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListStreams": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "LookupStreamObject": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RunStream": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StartBackfillJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StopBackfillJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateConnectionProfile": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php deleted file mode 100644 index 8188d319e7f5..000000000000 --- a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_descriptor_config.php +++ /dev/null @@ -1,510 +0,0 @@ - [ - 'google.cloud.datastream.v1.Datastream' => [ - 'CreateConnectionProfile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\ConnectionProfile', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePrivateConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\PrivateConnection', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\Route', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnectionProfile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateConnection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RunStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateConnectionProfile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\ConnectionProfile', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'connection_profile.name', - 'fieldAccessors' => [ - 'getConnectionProfile', - 'getName', - ], - ], - ], - ], - 'UpdateStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Datastream\V1\Stream', - 'metadataReturnType' => '\Google\Cloud\Datastream\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'stream.name', - 'fieldAccessors' => [ - 'getStream', - 'getName', - ], - ], - ], - ], - 'DiscoverConnectionProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\DiscoverConnectionProfileResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'FetchStaticIps' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getStaticIps', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\FetchStaticIpsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetConnectionProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\ConnectionProfile', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateConnection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\PrivateConnection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\Route', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\Stream', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetStreamObject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\StreamObject', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectionProfiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConnectionProfiles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\ListConnectionProfilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateConnections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPrivateConnections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\ListPrivateConnectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\ListRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListStreamObjects' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getStreamObjects', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\ListStreamObjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListStreams' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getStreams', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\ListStreamsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'LookupStreamObject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\StreamObject', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'StartBackfillJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\StartBackfillJobResponse', - 'headerParams' => [ - [ - 'keyName' => 'object', - 'fieldAccessors' => [ - 'getObject', - ], - ], - ], - ], - 'StopBackfillJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Datastream\V1\StopBackfillJobResponse', - 'headerParams' => [ - [ - 'keyName' => 'object', - 'fieldAccessors' => [ - 'getObject', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'connectionProfile' => 'projects/{project}/locations/{location}/connectionProfiles/{connection_profile}', - 'location' => 'projects/{project}/locations/{location}', - 'networks' => 'projects/{project}/global/networks/{network}', - 'privateConnection' => 'projects/{project}/locations/{location}/privateConnections/{private_connection}', - 'route' => 'projects/{project}/locations/{location}/privateConnections/{private_connection}/routes/{route}', - 'stream' => 'projects/{project}/locations/{location}/streams/{stream}', - 'streamObject' => 'projects/{project}/locations/{location}/streams/{stream}/objects/{object}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php b/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php deleted file mode 100644 index 9ee59f665e01..000000000000 --- a/owl-bot-staging/Datastream/v1/src/V1/resources/datastream_rest_client_config.php +++ /dev/null @@ -1,411 +0,0 @@ - [ - 'google.cloud.datastream.v1.Datastream' => [ - 'CreateConnectionProfile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectionProfiles', - 'body' => 'connection_profile', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'connection_profile_id', - ], - ], - 'CreatePrivateConnection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', - 'body' => 'private_connection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'private_connection_id', - ], - ], - 'CreateRoute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateConnections/*}/routes', - 'body' => 'route', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'route_id', - ], - ], - 'CreateStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/streams', - 'body' => 'stream', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'stream_id', - ], - ], - 'DeleteConnectionProfile' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectionProfiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePrivateConnection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRoute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStream' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DiscoverConnectionProfile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectionProfiles:discover', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'FetchStaticIps' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}:fetchStaticIps', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConnectionProfile' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/connectionProfiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPrivateConnection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/privateConnections/*/routes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetStream' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetStreamObject' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*/objects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectionProfiles' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/connectionProfiles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrivateConnections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/privateConnections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/privateConnections/*}/routes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListStreamObjects' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/streams/*}/objects', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListStreams' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/streams', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LookupStreamObject' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/streams/*}/objects:lookup', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/streams/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StartBackfillJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{object=projects/*/locations/*/streams/*/objects/*}:startBackfillJob', - 'body' => '*', - 'placeholders' => [ - 'object' => [ - 'getters' => [ - 'getObject', - ], - ], - ], - ], - 'StopBackfillJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{object=projects/*/locations/*/streams/*/objects/*}:stopBackfillJob', - 'body' => '*', - 'placeholders' => [ - 'object' => [ - 'getters' => [ - 'getObject', - ], - ], - ], - ], - 'UpdateConnectionProfile' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{connection_profile.name=projects/*/locations/*/connectionProfiles/*}', - 'body' => 'connection_profile', - 'placeholders' => [ - 'connection_profile.name' => [ - 'getters' => [ - 'getConnectionProfile', - 'getName', - ], - ], - ], - ], - 'UpdateStream' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{stream.name=projects/*/locations/*/streams/*}', - 'body' => 'stream', - 'placeholders' => [ - 'stream.name' => [ - 'getters' => [ - 'getStream', - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php b/owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php deleted file mode 100644 index 7c9346b9bc7c..000000000000 --- a/owl-bot-staging/Datastream/v1/tests/Unit/V1/Client/DatastreamClientTest.php +++ /dev/null @@ -1,2817 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DatastreamClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DatastreamClient($options); - } - - /** @test */ - public function createConnectionProfileTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectionProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectionProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectionProfileId = 'connectionProfileId1179884402'; - $connectionProfile = new ConnectionProfile(); - $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; - $connectionProfile->setDisplayName($connectionProfileDisplayName); - $request = (new CreateConnectionProfileRequest()) - ->setParent($formattedParent) - ->setConnectionProfileId($connectionProfileId) - ->setConnectionProfile($connectionProfile); - $response = $gapicClient->createConnectionProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateConnectionProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConnectionProfileId(); - $this->assertProtobufEquals($connectionProfileId, $actualValue); - $actualValue = $actualApiRequestObject->getConnectionProfile(); - $this->assertProtobufEquals($connectionProfile, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectionProfileTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createConnectionProfileExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectionProfileId = 'connectionProfileId1179884402'; - $connectionProfile = new ConnectionProfile(); - $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; - $connectionProfile->setDisplayName($connectionProfileDisplayName); - $request = (new CreateConnectionProfileRequest()) - ->setParent($formattedParent) - ->setConnectionProfileId($connectionProfileId) - ->setConnectionProfile($connectionProfile); - $response = $gapicClient->createConnectionProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectionProfileTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPrivateConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new PrivateConnection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPrivateConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateConnectionId = 'privateConnectionId-1948601248'; - $privateConnection = new PrivateConnection(); - $privateConnectionDisplayName = 'privateConnectionDisplayName1030451948'; - $privateConnection->setDisplayName($privateConnectionDisplayName); - $request = (new CreatePrivateConnectionRequest()) - ->setParent($formattedParent) - ->setPrivateConnectionId($privateConnectionId) - ->setPrivateConnection($privateConnection); - $response = $gapicClient->createPrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/CreatePrivateConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateConnectionId(); - $this->assertProtobufEquals($privateConnectionId, $actualValue); - $actualValue = $actualApiRequestObject->getPrivateConnection(); - $this->assertProtobufEquals($privateConnection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPrivateConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $privateConnectionId = 'privateConnectionId-1948601248'; - $privateConnection = new PrivateConnection(); - $privateConnectionDisplayName = 'privateConnectionDisplayName1030451948'; - $privateConnection->setDisplayName($privateConnectionDisplayName); - $request = (new CreatePrivateConnectionRequest()) - ->setParent($formattedParent) - ->setPrivateConnectionId($privateConnectionId) - ->setPrivateConnection($privateConnection); - $response = $gapicClient->createPrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPrivateConnectionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $destinationAddress = 'destinationAddress371693763'; - $destinationPort = 1205298706; - $expectedResponse = new Route(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDestinationAddress($destinationAddress); - $expectedResponse->setDestinationPort($destinationPort); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $routeId = 'routeId5418705'; - $route = new Route(); - $routeDisplayName = 'routeDisplayName-1988119452'; - $route->setDisplayName($routeDisplayName); - $routeDestinationAddress = 'routeDestinationAddress248623663'; - $route->setDestinationAddress($routeDestinationAddress); - $request = (new CreateRouteRequest()) - ->setParent($formattedParent) - ->setRouteId($routeId) - ->setRoute($route); - $response = $gapicClient->createRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRouteId(); - $this->assertProtobufEquals($routeId, $actualValue); - $actualValue = $actualApiRequestObject->getRoute(); - $this->assertProtobufEquals($route, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $routeId = 'routeId5418705'; - $route = new Route(); - $routeDisplayName = 'routeDisplayName-1988119452'; - $route->setDisplayName($routeDisplayName); - $routeDestinationAddress = 'routeDestinationAddress248623663'; - $route->setDestinationAddress($routeDestinationAddress); - $request = (new CreateRouteRequest()) - ->setParent($formattedParent) - ->setRouteId($routeId) - ->setRoute($route); - $response = $gapicClient->createRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createStreamTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $streamId = 'streamId-315624902'; - $stream = new Stream(); - $streamDisplayName = 'streamDisplayName41647821'; - $stream->setDisplayName($streamDisplayName); - $streamSourceConfig = new SourceConfig(); - $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); - $stream->setSourceConfig($streamSourceConfig); - $streamDestinationConfig = new DestinationConfig(); - $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); - $stream->setDestinationConfig($streamDestinationConfig); - $request = (new CreateStreamRequest()) - ->setParent($formattedParent) - ->setStreamId($streamId) - ->setStream($stream); - $response = $gapicClient->createStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getStreamId(); - $this->assertProtobufEquals($streamId, $actualValue); - $actualValue = $actualApiRequestObject->getStream(); - $this->assertProtobufEquals($stream, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createStreamTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createStreamExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $streamId = 'streamId-315624902'; - $stream = new Stream(); - $streamDisplayName = 'streamDisplayName41647821'; - $stream->setDisplayName($streamDisplayName); - $streamSourceConfig = new SourceConfig(); - $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); - $stream->setSourceConfig($streamSourceConfig); - $streamDestinationConfig = new DestinationConfig(); - $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); - $stream->setDestinationConfig($streamDestinationConfig); - $request = (new CreateStreamRequest()) - ->setParent($formattedParent) - ->setStreamId($streamId) - ->setStream($stream); - $response = $gapicClient->createStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createStreamTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectionProfileTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConnectionProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $request = (new DeleteConnectionProfileRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteConnectionProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/DeleteConnectionProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectionProfileTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectionProfileExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $request = (new DeleteConnectionProfileRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteConnectionProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectionProfileTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePrivateConnectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePrivateConnectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new DeletePrivateConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/DeletePrivateConnection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePrivateConnectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePrivateConnectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new DeletePrivateConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePrivateConnection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePrivateConnectionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); - $request = (new DeleteRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/DeleteRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); - $request = (new DeleteRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteStreamTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new DeleteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/DeleteStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteStreamExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new DeleteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function discoverConnectionProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DiscoverConnectionProfileResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new DiscoverConnectionProfileRequest()) - ->setParent($formattedParent); - $response = $gapicClient->discoverConnectionProfile($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.datastream.v1.Datastream/DiscoverConnectionProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function discoverConnectionProfileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new DiscoverConnectionProfileRequest()) - ->setParent($formattedParent); - try { - $gapicClient->discoverConnectionProfile($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 fetchStaticIpsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $staticIpsElement = 'staticIpsElement2078370200'; - $staticIps = [ - $staticIpsElement, - ]; - $expectedResponse = new FetchStaticIpsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setStaticIps($staticIps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new FetchStaticIpsRequest()) - ->setName($formattedName); - $response = $gapicClient->fetchStaticIps($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getStaticIps()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/FetchStaticIps', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchStaticIpsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new FetchStaticIpsRequest()) - ->setName($formattedName); - try { - $gapicClient->fetchStaticIps($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 getConnectionProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectionProfile(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $request = (new GetConnectionProfileRequest()) - ->setName($formattedName); - $response = $gapicClient->getConnectionProfile($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.datastream.v1.Datastream/GetConnectionProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectionProfileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $request = (new GetConnectionProfileRequest()) - ->setName($formattedName); - try { - $gapicClient->getConnectionProfile($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 getPrivateConnectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new PrivateConnection(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new GetPrivateConnectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getPrivateConnection($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.datastream.v1.Datastream/GetPrivateConnection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPrivateConnectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new GetPrivateConnectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getPrivateConnection($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 getRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $destinationAddress = 'destinationAddress371693763'; - $destinationPort = 1205298706; - $expectedResponse = new Route(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDestinationAddress($destinationAddress); - $expectedResponse->setDestinationPort($destinationPort); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); - $request = (new GetRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getRoute($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.datastream.v1.Datastream/GetRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->routeName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]', '[ROUTE]'); - $request = (new GetRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getRoute($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 getStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new GetStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->getStream($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.datastream.v1.Datastream/GetStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new GetStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->getStream($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 getStreamObjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new StreamObject(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); - $request = (new GetStreamObjectRequest()) - ->setName($formattedName); - $response = $gapicClient->getStreamObject($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.datastream.v1.Datastream/GetStreamObject', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStreamObjectExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); - $request = (new GetStreamObjectRequest()) - ->setName($formattedName); - try { - $gapicClient->getStreamObject($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 listConnectionProfilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $connectionProfilesElement = new ConnectionProfile(); - $connectionProfiles = [ - $connectionProfilesElement, - ]; - $expectedResponse = new ListConnectionProfilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConnectionProfiles($connectionProfiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListConnectionProfilesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listConnectionProfiles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConnectionProfiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/ListConnectionProfiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectionProfilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListConnectionProfilesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listConnectionProfiles($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 listPrivateConnectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $privateConnectionsElement = new PrivateConnection(); - $privateConnections = [ - $privateConnectionsElement, - ]; - $expectedResponse = new ListPrivateConnectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPrivateConnections($privateConnections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrivateConnectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPrivateConnections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPrivateConnections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/ListPrivateConnections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrivateConnectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrivateConnectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPrivateConnections($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 listRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $routesElement = new Route(); - $routes = [ - $routesElement, - ]; - $expectedResponse = new ListRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRoutes($routes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new ListRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/ListRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->privateConnectionName('[PROJECT]', '[LOCATION]', '[PRIVATE_CONNECTION]'); - $request = (new ListRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRoutes($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 listStreamObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $streamObjectsElement = new StreamObject(); - $streamObjects = [ - $streamObjectsElement, - ]; - $expectedResponse = new ListStreamObjectsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setStreamObjects($streamObjects); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new ListStreamObjectsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listStreamObjects($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getStreamObjects()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/ListStreamObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listStreamObjectsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new ListStreamObjectsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listStreamObjects($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 listStreamsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $streamsElement = new Stream(); - $streams = [ - $streamsElement, - ]; - $expectedResponse = new ListStreamsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setStreams($streams); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListStreamsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listStreams($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getStreams()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/ListStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listStreamsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListStreamsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listStreams($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 lookupStreamObjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new StreamObject(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $sourceObjectIdentifier = new SourceObjectIdentifier(); - $request = (new LookupStreamObjectRequest()) - ->setParent($formattedParent) - ->setSourceObjectIdentifier($sourceObjectIdentifier); - $response = $gapicClient->lookupStreamObject($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.datastream.v1.Datastream/LookupStreamObject', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSourceObjectIdentifier(); - $this->assertProtobufEquals($sourceObjectIdentifier, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function lookupStreamObjectExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $sourceObjectIdentifier = new SourceObjectIdentifier(); - $request = (new LookupStreamObjectRequest()) - ->setParent($formattedParent) - ->setSourceObjectIdentifier($sourceObjectIdentifier); - try { - $gapicClient->lookupStreamObject($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 runStreamTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new RunStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->runStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/RunStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runStreamTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function runStreamExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[STREAM]'); - $request = (new RunStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->runStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runStreamTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startBackfillJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StartBackfillJobResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); - $request = (new StartBackfillJobRequest()) - ->setObject($formattedObject); - $response = $gapicClient->startBackfillJob($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.datastream.v1.Datastream/StartBackfillJob', $actualFuncCall); - $actualValue = $actualRequestObject->getObject(); - $this->assertProtobufEquals($formattedObject, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function startBackfillJobExceptionTest() - { - $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 - $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); - $request = (new StartBackfillJobRequest()) - ->setObject($formattedObject); - try { - $gapicClient->startBackfillJob($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 stopBackfillJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StopBackfillJobResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); - $request = (new StopBackfillJobRequest()) - ->setObject($formattedObject); - $response = $gapicClient->stopBackfillJob($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.datastream.v1.Datastream/StopBackfillJob', $actualFuncCall); - $actualValue = $actualRequestObject->getObject(); - $this->assertProtobufEquals($formattedObject, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopBackfillJobExceptionTest() - { - $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 - $formattedObject = $gapicClient->streamObjectName('[PROJECT]', '[LOCATION]', '[STREAM]', '[OBJECT]'); - $request = (new StopBackfillJobRequest()) - ->setObject($formattedObject); - try { - $gapicClient->stopBackfillJob($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 updateConnectionProfileTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectionProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateConnectionProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $connectionProfile = new ConnectionProfile(); - $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; - $connectionProfile->setDisplayName($connectionProfileDisplayName); - $request = (new UpdateConnectionProfileRequest()) - ->setConnectionProfile($connectionProfile); - $response = $gapicClient->updateConnectionProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/UpdateConnectionProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getConnectionProfile(); - $this->assertProtobufEquals($connectionProfile, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectionProfileTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectionProfileExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $connectionProfile = new ConnectionProfile(); - $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; - $connectionProfile->setDisplayName($connectionProfileDisplayName); - $request = (new UpdateConnectionProfileRequest()) - ->setConnectionProfile($connectionProfile); - $response = $gapicClient->updateConnectionProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectionProfileTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateStreamTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $customerManagedEncryptionKey = 'customerManagedEncryptionKey1016600004'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setCustomerManagedEncryptionKey($customerManagedEncryptionKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $stream = new Stream(); - $streamDisplayName = 'streamDisplayName41647821'; - $stream->setDisplayName($streamDisplayName); - $streamSourceConfig = new SourceConfig(); - $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); - $stream->setSourceConfig($streamSourceConfig); - $streamDestinationConfig = new DestinationConfig(); - $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); - $stream->setDestinationConfig($streamDestinationConfig); - $request = (new UpdateStreamRequest()) - ->setStream($stream); - $response = $gapicClient->updateStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/UpdateStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getStream(); - $this->assertProtobufEquals($stream, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateStreamTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateStreamExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $stream = new Stream(); - $streamDisplayName = 'streamDisplayName41647821'; - $stream->setDisplayName($streamDisplayName); - $streamSourceConfig = new SourceConfig(); - $sourceConfigSourceConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamSourceConfig->setSourceConnectionProfile($sourceConfigSourceConnectionProfile); - $stream->setSourceConfig($streamSourceConfig); - $streamDestinationConfig = new DestinationConfig(); - $destinationConfigDestinationConnectionProfile = $gapicClient->connectionProfileName('[PROJECT]', '[LOCATION]', '[CONNECTION_PROFILE]'); - $streamDestinationConfig->setDestinationConnectionProfile($destinationConfigDestinationConnectionProfile); - $stream->setDestinationConfig($streamDestinationConfig); - $request = (new UpdateStreamRequest()) - ->setStream($stream); - $response = $gapicClient->updateStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateStreamTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectionProfileAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectionProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectionProfile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectionProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $connectionProfileId = 'connectionProfileId1179884402'; - $connectionProfile = new ConnectionProfile(); - $connectionProfileDisplayName = 'connectionProfileDisplayName-1452081022'; - $connectionProfile->setDisplayName($connectionProfileDisplayName); - $request = (new CreateConnectionProfileRequest()) - ->setParent($formattedParent) - ->setConnectionProfileId($connectionProfileId) - ->setConnectionProfile($connectionProfile); - $response = $gapicClient->createConnectionProfileAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.datastream.v1.Datastream/CreateConnectionProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getConnectionProfileId(); - $this->assertProtobufEquals($connectionProfileId, $actualValue); - $actualValue = $actualApiRequestObject->getConnectionProfile(); - $this->assertProtobufEquals($connectionProfile, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectionProfileTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}