Skip to content

Commit fb9238b

Browse files
1 parent 69d1bc3 commit fb9238b

File tree

7 files changed

+282
-6
lines changed

7 files changed

+282
-6
lines changed

clients/google-api-services-pubsub/v1/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-pubsub</artifactId>
25-
<version>v1-rev20241231-2.0.0</version>
25+
<version>v1-rev20250128-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-pubsub:v1-rev20241231-2.0.0'
38+
implementation 'com.google.apis:google-api-services-pubsub:v1-rev20250128-2.0.0'
3939
}
4040
```
4141

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.pubsub.model;
18+
19+
/**
20+
* User-defined JavaScript function that can transform or filter a Pub/Sub message.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Pub/Sub API. For a detailed explanation see:
24+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
25+
* </p>
26+
*
27+
* @author Google, Inc.
28+
*/
29+
@SuppressWarnings("javadoc")
30+
public final class JavaScriptUDF extends com.google.api.client.json.GenericJson {
31+
32+
/**
33+
* Required. JavaScript code that contains a function `function_name` with the below signature: *
34+
* * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return
35+
* `null`. To transform a message return a map * with the following keys: * - (required) 'data' :
36+
* {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all
37+
* attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required)
38+
* 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub
39+
* message metadata. * Keys: * - (required) 'message_id' : {string} * - (optional) 'publish_time':
40+
* {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} function
41+
* (message, metadata) { }
42+
* The value may be {@code null}.
43+
*/
44+
@com.google.api.client.util.Key
45+
private java.lang.String code;
46+
47+
/**
48+
* Required. Name of the JavasScript function that should applied to Pub/Sub messages.
49+
* The value may be {@code null}.
50+
*/
51+
@com.google.api.client.util.Key
52+
private java.lang.String functionName;
53+
54+
/**
55+
* Required. JavaScript code that contains a function `function_name` with the below signature: *
56+
* * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return
57+
* `null`. To transform a message return a map * with the following keys: * - (required) 'data' :
58+
* {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all
59+
* attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required)
60+
* 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub
61+
* message metadata. * Keys: * - (required) 'message_id' : {string} * - (optional) 'publish_time':
62+
* {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} function
63+
* (message, metadata) { }
64+
* @return value or {@code null} for none
65+
*/
66+
public java.lang.String getCode() {
67+
return code;
68+
}
69+
70+
/**
71+
* Required. JavaScript code that contains a function `function_name` with the below signature: *
72+
* * Transforms a Pub/Sub message. * @return {(Object)>|null)} - To * filter a message, return
73+
* `null`. To transform a message return a map * with the following keys: * - (required) 'data' :
74+
* {string} * - (optional) 'attributes' : {Object} * Returning empty `attributes` will remove all
75+
* attributes from the * message. * * @param {(Object)>} Pub/Sub * message. Keys: * - (required)
76+
* 'data' : {string} * - (required) 'attributes' : {Object} * * @param {Object} metadata - Pub/Sub
77+
* message metadata. * Keys: * - (required) 'message_id' : {string} * - (optional) 'publish_time':
78+
* {string} YYYY-MM-DDTHH:MM:SSZ format * - (optional) 'ordering_key': {string} function
79+
* (message, metadata) { }
80+
* @param code code or {@code null} for none
81+
*/
82+
public JavaScriptUDF setCode(java.lang.String code) {
83+
this.code = code;
84+
return this;
85+
}
86+
87+
/**
88+
* Required. Name of the JavasScript function that should applied to Pub/Sub messages.
89+
* @return value or {@code null} for none
90+
*/
91+
public java.lang.String getFunctionName() {
92+
return functionName;
93+
}
94+
95+
/**
96+
* Required. Name of the JavasScript function that should applied to Pub/Sub messages.
97+
* @param functionName functionName or {@code null} for none
98+
*/
99+
public JavaScriptUDF setFunctionName(java.lang.String functionName) {
100+
this.functionName = functionName;
101+
return this;
102+
}
103+
104+
@Override
105+
public JavaScriptUDF set(String fieldName, Object value) {
106+
return (JavaScriptUDF) super.set(fieldName, value);
107+
}
108+
109+
@Override
110+
public JavaScriptUDF clone() {
111+
return (JavaScriptUDF) super.clone();
112+
}
113+
114+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.pubsub.model;
18+
19+
/**
20+
* All supported message transforms types.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Pub/Sub API. For a detailed explanation see:
24+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
25+
* </p>
26+
*
27+
* @author Google, Inc.
28+
*/
29+
@SuppressWarnings("javadoc")
30+
public final class MessageTransform extends com.google.api.client.json.GenericJson {
31+
32+
/**
33+
* Optional. If set to true, the transform is enabled. If false, the transform is disabled and
34+
* will not be applied to messages. Defaults to `true`.
35+
* The value may be {@code null}.
36+
*/
37+
@com.google.api.client.util.Key
38+
private java.lang.Boolean enabled;
39+
40+
/**
41+
* Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a
42+
* resource, each must have a unique `function_name`.
43+
* The value may be {@code null}.
44+
*/
45+
@com.google.api.client.util.Key
46+
private JavaScriptUDF javascriptUdf;
47+
48+
/**
49+
* Optional. If set to true, the transform is enabled. If false, the transform is disabled and
50+
* will not be applied to messages. Defaults to `true`.
51+
* @return value or {@code null} for none
52+
*/
53+
public java.lang.Boolean getEnabled() {
54+
return enabled;
55+
}
56+
57+
/**
58+
* Optional. If set to true, the transform is enabled. If false, the transform is disabled and
59+
* will not be applied to messages. Defaults to `true`.
60+
* @param enabled enabled or {@code null} for none
61+
*/
62+
public MessageTransform setEnabled(java.lang.Boolean enabled) {
63+
this.enabled = enabled;
64+
return this;
65+
}
66+
67+
/**
68+
* Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a
69+
* resource, each must have a unique `function_name`.
70+
* @return value or {@code null} for none
71+
*/
72+
public JavaScriptUDF getJavascriptUdf() {
73+
return javascriptUdf;
74+
}
75+
76+
/**
77+
* Optional. JavaScript User Defined Function. If multiple JavaScriptUDF's are specified on a
78+
* resource, each must have a unique `function_name`.
79+
* @param javascriptUdf javascriptUdf or {@code null} for none
80+
*/
81+
public MessageTransform setJavascriptUdf(JavaScriptUDF javascriptUdf) {
82+
this.javascriptUdf = javascriptUdf;
83+
return this;
84+
}
85+
86+
@Override
87+
public MessageTransform set(String fieldName, Object value) {
88+
return (MessageTransform) super.set(fieldName, value);
89+
}
90+
91+
@Override
92+
public MessageTransform clone() {
93+
return (MessageTransform) super.clone();
94+
}
95+
96+
}

clients/google-api-services-pubsub/v1/2.0.0/com/google/api/services/pubsub/model/Subscription.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,20 @@ public final class Subscription extends com.google.api.client.json.GenericJson {
155155
@com.google.api.client.util.Key
156156
private String messageRetentionDuration;
157157

158+
/**
159+
* Optional. Transforms to be applied to messages before they are delivered to subscribers.
160+
* Transforms are applied in the order specified.
161+
* The value may be {@code null}.
162+
*/
163+
@com.google.api.client.util.Key
164+
private java.util.List<MessageTransform> messageTransforms;
165+
166+
static {
167+
// hack to force ProGuard to consider MessageTransform used, since otherwise it would be stripped out
168+
// see https://github.com/google/google-api-java-client/issues/543
169+
com.google.api.client.util.Data.nullOf(MessageTransform.class);
170+
}
171+
158172
/**
159173
* Required. The name of the subscription. It must have the format
160174
* `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter,
@@ -506,6 +520,25 @@ public Subscription setMessageRetentionDuration(String messageRetentionDuration)
506520
return this;
507521
}
508522

523+
/**
524+
* Optional. Transforms to be applied to messages before they are delivered to subscribers.
525+
* Transforms are applied in the order specified.
526+
* @return value or {@code null} for none
527+
*/
528+
public java.util.List<MessageTransform> getMessageTransforms() {
529+
return messageTransforms;
530+
}
531+
532+
/**
533+
* Optional. Transforms to be applied to messages before they are delivered to subscribers.
534+
* Transforms are applied in the order specified.
535+
* @param messageTransforms messageTransforms or {@code null} for none
536+
*/
537+
public Subscription setMessageTransforms(java.util.List<MessageTransform> messageTransforms) {
538+
this.messageTransforms = messageTransforms;
539+
return this;
540+
}
541+
509542
/**
510543
* Required. The name of the subscription. It must have the format
511544
* `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter,

clients/google-api-services-pubsub/v1/2.0.0/com/google/api/services/pubsub/model/Topic.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ public final class Topic extends com.google.api.client.json.GenericJson {
7272
@com.google.api.client.util.Key
7373
private MessageStoragePolicy messageStoragePolicy;
7474

75+
/**
76+
* Optional. Transforms to be applied to messages published to the topic. Transforms are applied
77+
* in the order specified.
78+
* The value may be {@code null}.
79+
*/
80+
@com.google.api.client.util.Key
81+
private java.util.List<MessageTransform> messageTransforms;
82+
83+
static {
84+
// hack to force ProGuard to consider MessageTransform used, since otherwise it would be stripped out
85+
// see https://github.com/google/google-api-java-client/issues/543
86+
com.google.api.client.util.Data.nullOf(MessageTransform.class);
87+
}
88+
7589
/**
7690
* Required. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`.
7791
* `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`),
@@ -205,6 +219,25 @@ public Topic setMessageStoragePolicy(MessageStoragePolicy messageStoragePolicy)
205219
return this;
206220
}
207221

222+
/**
223+
* Optional. Transforms to be applied to messages published to the topic. Transforms are applied
224+
* in the order specified.
225+
* @return value or {@code null} for none
226+
*/
227+
public java.util.List<MessageTransform> getMessageTransforms() {
228+
return messageTransforms;
229+
}
230+
231+
/**
232+
* Optional. Transforms to be applied to messages published to the topic. Transforms are applied
233+
* in the order specified.
234+
* @param messageTransforms messageTransforms or {@code null} for none
235+
*/
236+
public Topic setMessageTransforms(java.util.List<MessageTransform> messageTransforms) {
237+
this.messageTransforms = messageTransforms;
238+
return this;
239+
}
240+
208241
/**
209242
* Required. The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`.
210243
* `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`),

clients/google-api-services-pubsub/v1/2.0.0/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<groupId>com.google.apis</groupId>
1010
<artifactId>google-api-services-pubsub</artifactId>
11-
<version>v1-rev20241231-2.0.0</version>
12-
<name>Cloud Pub/Sub API v1-rev20241231-2.0.0</name>
11+
<version>v1-rev20250128-2.0.0</version>
12+
<name>Cloud Pub/Sub API v1-rev20250128-2.0.0</name>
1313
<packaging>jar</packaging>
1414

1515
<inceptionYear>2011</inceptionYear>

clients/google-api-services-pubsub/v1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-pubsub</artifactId>
25-
<version>v1-rev20241231-2.0.0</version>
25+
<version>v1-rev20250128-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-pubsub:v1-rev20241231-2.0.0'
38+
implementation 'com.google.apis:google-api-services-pubsub:v1-rev20250128-2.0.0'
3939
}
4040
```
4141

0 commit comments

Comments
 (0)