Skip to content

Commit c966bde

Browse files
feat: Automated regeneration of PubSub client (googleapis#12918)
Auto-created at 2025-02-04 13:15:21 +0000 using the toys pull request generator.
1 parent b5a289a commit c966bde

File tree

5 files changed

+105
-1
lines changed

5 files changed

+105
-1
lines changed

clients/pub_sub/lib/google_api/pub_sub/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.PubSub.V1 do
2020
API client metadata for GoogleApi.PubSub.V1.
2121
"""
2222

23-
@discovery_revision "20241231"
23+
@discovery_revision "20250128"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.PubSub.V1.Model.JavaScriptUDF do
19+
@moduledoc """
20+
User-defined JavaScript function that can transform or filter a Pub/Sub message.
21+
22+
## Attributes
23+
24+
* `code` (*type:* `String.t`, *default:* `nil`) - Required. JavaScript code that contains a function `function_name` with the below signature: /** * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return `null`. To transform a message return a map * with the following keys: * - (required) 'data' : {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required) 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub message metadata. * Keys: * - (required) 'message_id' : {string} * - (optional) 'publish_time': {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} */ function (message, metadata) { }
25+
* `functionName` (*type:* `String.t`, *default:* `nil`) - Required. Name of the JavasScript function that should applied to Pub/Sub messages.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:code => String.t() | nil,
32+
:functionName => String.t() | nil
33+
}
34+
35+
field(:code)
36+
field(:functionName)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.PubSub.V1.Model.JavaScriptUDF do
40+
def decode(value, options) do
41+
GoogleApi.PubSub.V1.Model.JavaScriptUDF.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.PubSub.V1.Model.JavaScriptUDF do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.PubSub.V1.Model.MessageTransform do
19+
@moduledoc """
20+
All supported message transforms types.
21+
22+
## Attributes
23+
24+
* `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, the transform is enabled. If false, the transform is disabled and will not be applied to messages. Defaults to `true`.
25+
* `javascriptUdf` (*type:* `GoogleApi.PubSub.V1.Model.JavaScriptUDF.t`, *default:* `nil`) - Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a resource, each must have a unique `function_name`.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:enabled => boolean() | nil,
32+
:javascriptUdf => GoogleApi.PubSub.V1.Model.JavaScriptUDF.t() | nil
33+
}
34+
35+
field(:enabled)
36+
field(:javascriptUdf, as: GoogleApi.PubSub.V1.Model.JavaScriptUDF)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.PubSub.V1.Model.MessageTransform do
40+
def decode(value, options) do
41+
GoogleApi.PubSub.V1.Model.MessageTransform.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.PubSub.V1.Model.MessageTransform do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

clients/pub_sub/lib/google_api/pub_sub/v1/model/subscription.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ defmodule GoogleApi.PubSub.V1.Model.Subscription do
3333
* `filter` (*type:* `String.t`, *default:* `nil`) - Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.
3434
* `labels` (*type:* `map()`, *default:* `nil`) - Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
3535
* `messageRetentionDuration` (*type:* `String.t`, *default:* `nil`) - Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 31 days or less than 10 minutes.
36+
* `messageTransforms` (*type:* `list(GoogleApi.PubSub.V1.Model.MessageTransform.t)`, *default:* `nil`) - Optional. Transforms to be applied to messages before they are delivered to subscribers. Transforms are applied in the order specified.
3637
* `name` (*type:* `String.t`, *default:* `nil`) - Required. The name of the subscription. It must have the format `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
3738
* `pushConfig` (*type:* `GoogleApi.PubSub.V1.Model.PushConfig.t`, *default:* `nil`) - Optional. If push delivery is used with this subscription, this field is used to configure it.
3839
* `retainAckedMessages` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-acknowledged messages.
@@ -58,6 +59,7 @@ defmodule GoogleApi.PubSub.V1.Model.Subscription do
5859
:filter => String.t() | nil,
5960
:labels => map() | nil,
6061
:messageRetentionDuration => String.t() | nil,
62+
:messageTransforms => list(GoogleApi.PubSub.V1.Model.MessageTransform.t()) | nil,
6163
:name => String.t() | nil,
6264
:pushConfig => GoogleApi.PubSub.V1.Model.PushConfig.t() | nil,
6365
:retainAckedMessages => boolean() | nil,
@@ -79,6 +81,7 @@ defmodule GoogleApi.PubSub.V1.Model.Subscription do
7981
field(:filter)
8082
field(:labels, type: :map)
8183
field(:messageRetentionDuration)
84+
field(:messageTransforms, as: GoogleApi.PubSub.V1.Model.MessageTransform, type: :list)
8285
field(:name)
8386
field(:pushConfig, as: GoogleApi.PubSub.V1.Model.PushConfig)
8487
field(:retainAckedMessages)

clients/pub_sub/lib/google_api/pub_sub/v1/model/topic.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ defmodule GoogleApi.PubSub.V1.Model.Topic do
2626
* `labels` (*type:* `map()`, *default:* `nil`) - Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
2727
* `messageRetentionDuration` (*type:* `String.t`, *default:* `nil`) - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.
2828
* `messageStoragePolicy` (*type:* `GoogleApi.PubSub.V1.Model.MessageStoragePolicy.t`, *default:* `nil`) - Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect.
29+
* `messageTransforms` (*type:* `list(GoogleApi.PubSub.V1.Model.MessageTransform.t)`, *default:* `nil`) - Optional. Transforms to be applied to messages published to the topic. Transforms are applied in the order specified.
2930
* `name` (*type:* `String.t`, *default:* `nil`) - Required. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`.
3031
* `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
3132
* `schemaSettings` (*type:* `GoogleApi.PubSub.V1.Model.SchemaSettings.t`, *default:* `nil`) - Optional. Settings for validating messages published against a schema.
@@ -41,6 +42,7 @@ defmodule GoogleApi.PubSub.V1.Model.Topic do
4142
:labels => map() | nil,
4243
:messageRetentionDuration => String.t() | nil,
4344
:messageStoragePolicy => GoogleApi.PubSub.V1.Model.MessageStoragePolicy.t() | nil,
45+
:messageTransforms => list(GoogleApi.PubSub.V1.Model.MessageTransform.t()) | nil,
4446
:name => String.t() | nil,
4547
:satisfiesPzs => boolean() | nil,
4648
:schemaSettings => GoogleApi.PubSub.V1.Model.SchemaSettings.t() | nil,
@@ -52,6 +54,7 @@ defmodule GoogleApi.PubSub.V1.Model.Topic do
5254
field(:labels, type: :map)
5355
field(:messageRetentionDuration)
5456
field(:messageStoragePolicy, as: GoogleApi.PubSub.V1.Model.MessageStoragePolicy)
57+
field(:messageTransforms, as: GoogleApi.PubSub.V1.Model.MessageTransform, type: :list)
5558
field(:name)
5659
field(:satisfiesPzs)
5760
field(:schemaSettings, as: GoogleApi.PubSub.V1.Model.SchemaSettings)

0 commit comments

Comments
 (0)