Skip to content

Commit ef9c9d1

Browse files
feat: [PubSub] Annotate some resource fields with their corresponding API types (#8663)
* feat: Annotate some resource fields with their corresponding API types feat: Add AwsKinesisFailureReason.ApiViolationReason feat: Add tags to Subscription, Topic, and CreateSnapshotRequest messages for use in CreateSubscription, CreateTopic, and CreateSnapshot requests respectively docs: A comment for field `received_messages` in message `.google.pubsub.v1.StreamingPullResponse` is changed PiperOrigin-RevId: 820071518 Source-Link: googleapis/googleapis@e938992 Source-Link: googleapis/googleapis-gen@825a3ca Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiI4MjVhM2NhYTI0ZjBiZjE3MGYxYzU2ZWE1ZjJjZjczNGY4ZjlmYzUxIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8f02905 commit ef9c9d1

15 files changed

Lines changed: 245 additions & 22 deletions

PubSub/metadata/V1/Pubsub.php

897 Bytes
Binary file not shown.

PubSub/src/V1/Client/PublisherClient.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,27 @@ private static function getClientDefaults()
129129
];
130130
}
131131

132+
/**
133+
* Formats a string containing the fully-qualified path to represent a crypto_key
134+
* resource.
135+
*
136+
* @param string $project
137+
* @param string $location
138+
* @param string $keyRing
139+
* @param string $cryptoKey
140+
*
141+
* @return string The formatted crypto_key resource.
142+
*/
143+
public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string
144+
{
145+
return self::getPathTemplate('cryptoKey')->render([
146+
'project' => $project,
147+
'location' => $location,
148+
'key_ring' => $keyRing,
149+
'crypto_key' => $cryptoKey,
150+
]);
151+
}
152+
132153
/**
133154
* Formats a string containing the fully-qualified path to represent a
134155
* _deleted-topic_ resource.
@@ -227,6 +248,7 @@ public static function topicName(string $project, string $topic): string
227248
* Parses a formatted name string and returns an associative array of the components in the name.
228249
* The following name formats are supported:
229250
* Template: Pattern
251+
* - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
230252
* - deletedTopic: _deleted-topic_
231253
* - project: projects/{project}
232254
* - projectTopic: projects/{project}/topics/{topic}

PubSub/src/V1/Client/SubscriberClient.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,27 @@ public static function deletedTopicName(): string
155155
return self::getPathTemplate('deletedTopic')->render([]);
156156
}
157157

158+
/**
159+
* Formats a string containing the fully-qualified path to represent a listing
160+
* resource.
161+
*
162+
* @param string $project
163+
* @param string $location
164+
* @param string $dataExchange
165+
* @param string $listing
166+
*
167+
* @return string The formatted listing resource.
168+
*/
169+
public static function listingName(string $project, string $location, string $dataExchange, string $listing): string
170+
{
171+
return self::getPathTemplate('listing')->render([
172+
'project' => $project,
173+
'location' => $location,
174+
'data_exchange' => $dataExchange,
175+
'listing' => $listing,
176+
]);
177+
}
178+
158179
/**
159180
* Formats a string containing the fully-qualified path to represent a project
160181
* resource.
@@ -243,6 +264,7 @@ public static function topicName(string $project, string $topic): string
243264
* The following name formats are supported:
244265
* Template: Pattern
245266
* - deletedTopic: _deleted-topic_
267+
* - listing: projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}
246268
* - project: projects/{project}
247269
* - projectTopic: projects/{project}/topics/{topic}
248270
* - snapshot: projects/{project}/snapshots/{snapshot}

PubSub/src/V1/CreateSnapshotRequest.php

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PubSub/src/V1/DeadLetterPolicy.php

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PubSub/src/V1/IngestionDataSourceSettings/AwsMsk.php

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PubSub/src/V1/IngestionFailureEvent.php

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PubSub/src/V1/IngestionFailureEvent/AwsKinesisFailureReason.php

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PubSub/src/V1/ListTopicSnapshotsResponse.php

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

PubSub/src/V1/StreamingPullResponse.php

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)