Skip to content

Commit 8881373

Browse files
feat: add ingestion_data_source_settings field to Topic (#6987)
PiperOrigin-RevId: 600786127 Source-Link: googleapis/googleapis@708f769 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3b85818ca8f12ace75390cea24e5f3df5ac70be7 Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiIzYjg1ODE4Y2E4ZjEyYWNlNzUzOTBjZWEyNGU1ZjNkZjVhYzcwYmU3In0=
1 parent 3c57627 commit 8881373

File tree

7 files changed

+568
-0
lines changed

7 files changed

+568
-0
lines changed

metadata/V1/Pubsub.php

710 Bytes
Binary file not shown.

src/V1/Gapic/PublisherGapicClient.php

+16
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
use Google\Cloud\PubSub\V1\DetachSubscriptionRequest;
4545
use Google\Cloud\PubSub\V1\DetachSubscriptionResponse;
4646
use Google\Cloud\PubSub\V1\GetTopicRequest;
47+
use Google\Cloud\PubSub\V1\IngestionDataSourceSettings;
4748
use Google\Cloud\PubSub\V1\ListTopicSnapshotsRequest;
4849
use Google\Cloud\PubSub\V1\ListTopicSnapshotsResponse;
4950
use Google\Cloud\PubSub\V1\ListTopicSubscriptionsRequest;
@@ -56,6 +57,7 @@
5657
use Google\Cloud\PubSub\V1\PubsubMessage;
5758
use Google\Cloud\PubSub\V1\SchemaSettings;
5859
use Google\Cloud\PubSub\V1\Topic;
60+
use Google\Cloud\PubSub\V1\Topic\State;
5961
use Google\Cloud\PubSub\V1\UpdateTopicRequest;
6062
use Google\Protobuf\Duration;
6163
use Google\Protobuf\FieldMask;
@@ -467,6 +469,12 @@ public function __construct(array $options = [])
467469
* that is up to `message_retention_duration` in the past. If this field is
468470
* not set, message retention is controlled by settings on individual
469471
* subscriptions. Cannot be more than 31 days or less than 10 minutes.
472+
* @type int $state
473+
* Output only. An output-only field indicating the state of the topic.
474+
* For allowed values, use constants defined on {@see \Google\Cloud\PubSub\V1\Topic\State}
475+
* @type IngestionDataSourceSettings $ingestionDataSourceSettings
476+
* Optional. Settings for managed ingestion from a data source into this
477+
* topic.
470478
* @type RetrySettings|array $retrySettings
471479
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
472480
* associative array of retry settings parameters. See the documentation on
@@ -507,6 +515,14 @@ public function createTopic($name, array $optionalArgs = [])
507515
$request->setMessageRetentionDuration($optionalArgs['messageRetentionDuration']);
508516
}
509517

518+
if (isset($optionalArgs['state'])) {
519+
$request->setState($optionalArgs['state']);
520+
}
521+
522+
if (isset($optionalArgs['ingestionDataSourceSettings'])) {
523+
$request->setIngestionDataSourceSettings($optionalArgs['ingestionDataSourceSettings']);
524+
}
525+
510526
$requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
511527
$optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
512528
return $this->startCall('CreateTopic', Topic::class, $optionalArgs, $request)->wait();

src/V1/IngestionDataSourceSettings.php

+75
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/V1/IngestionDataSourceSettings/AwsKinesis.php

+234
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)