Skip to content

Commit

Permalink
feat: A new method RunStream is added to service Datastream (#7848)
Browse files Browse the repository at this point in the history
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: googleapis/googleapis@798a8be
Source-Link: googleapis/googleapis-gen@c1fe03a
Copy-Tag: eyJwIjoiRGF0YXN0cmVhbS8uT3dsQm90LnlhbWwiLCJoIjoiYzFmZTAzYTgxOGM5YzEwYjJkNThiYTdmMzRlYjY2YzNmMGEwODE5YSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Nov 25, 2024
1 parent e0d75ca commit 6241281
Show file tree
Hide file tree
Showing 54 changed files with 3,747 additions and 50 deletions.
Binary file modified Datastream/metadata/V1/Datastream.php
Binary file not shown.
Binary file modified Datastream/metadata/V1/DatastreamResources.php
Binary file not shown.
85 changes: 85 additions & 0 deletions Datastream/samples/V1/DatastreamClient/run_stream.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START datastream_v1_generated_Datastream_RunStream_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\Datastream\V1\Client\DatastreamClient;
use Google\Cloud\Datastream\V1\RunStreamRequest;
use Google\Cloud\Datastream\V1\Stream;
use Google\Rpc\Status;

/**
* Use this method to start, resume or recover a stream with a non default CDC
* strategy.
*
* @param string $formattedName Name of the stream resource to start, in the format:
* projects/{project_id}/locations/{location}/streams/{stream_name}
* Please see {@see DatastreamClient::streamName()} for help formatting this field.
*/
function run_stream_sample(string $formattedName): void
{
// Create a client.
$datastreamClient = new DatastreamClient();

// Prepare the request message.
$request = (new RunStreamRequest())
->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]
14 changes: 7 additions & 7 deletions Datastream/src/V1/BackfillJob.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions Datastream/src/V1/BigQueryDestinationConfig.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions Datastream/src/V1/BigQueryDestinationConfig/AppendOnly.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions Datastream/src/V1/BigQueryDestinationConfig/Merge.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6241281

Please sign in to comment.