From fa732db5472d4be6d0753c4b1708be2ce5e060fe Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 16 Sep 2026 18:08:53 -0700 Subject: [PATCH] chore: regenerate fcm client --- .../v1/2.0.0/README.md | 4 +- .../fcm/v1/FirebaseCloudMessaging.java | 904 +++++++++++++++++- .../api/services/fcm/v1/model/Empty.java | 45 + .../model/ListTopicSubscriptionsResponse.java | 94 ++ .../api/services/fcm/v1/model/Message.java | 21 +- .../fcm/v1/model/TopicSubscription.java | 127 +++ .../google-api-services-fcm/v1/2.0.0/pom.xml | 4 +- clients/google-api-services-fcm/v1/README.md | 4 +- 8 files changed, 1186 insertions(+), 17 deletions(-) create mode 100644 clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Empty.java create mode 100644 clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/ListTopicSubscriptionsResponse.java create mode 100644 clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/TopicSubscription.java diff --git a/clients/google-api-services-fcm/v1/2.0.0/README.md b/clients/google-api-services-fcm/v1/2.0.0/README.md index 55b4f531e52..6fd4e014eae 100644 --- a/clients/google-api-services-fcm/v1/2.0.0/README.md +++ b/clients/google-api-services-fcm/v1/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-fcm - v1-rev20260619-2.0.0 + v1-rev20260911-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-fcm:v1-rev20260619-2.0.0' + implementation 'com.google.apis:google-api-services-fcm:v1-rev20260911-2.0.0' } ``` diff --git a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/FirebaseCloudMessaging.java b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/FirebaseCloudMessaging.java index 498da5424e0..a588467df0e 100644 --- a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/FirebaseCloudMessaging.java +++ b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/FirebaseCloudMessaging.java @@ -174,7 +174,9 @@ public Messages messages() { public class Messages { /** - * Send a message to specified target (a registration token, topic or condition). + * Send a message to specified target (a [Firebase Installation ID (FID)](/docs/cloud- + * messaging/android/get-started#access-firebase-installation-id), registration token, topic, or + * condition). * * Create a request for the method "messages.send". * @@ -201,7 +203,9 @@ public class Send extends FirebaseCloudMessagingRequestThe typical use is:

+ *
+     *   {@code FirebaseCloudMessaging fcm = new FirebaseCloudMessaging(...);}
+     *   {@code FirebaseCloudMessaging.Registrations.List request = fcm.registrations().list(parameters ...)}
+     * 
+ * + * @return the resource collection + */ + public Registrations registrations() { + return new Registrations(); + } + + /** + * The "registrations" collection of methods. + */ + public class Registrations { + + /** + * An accessor for creating requests from the TopicSubscriptions collection. + * + *

The typical use is:

+ *
+       *   {@code FirebaseCloudMessaging fcm = new FirebaseCloudMessaging(...);}
+       *   {@code FirebaseCloudMessaging.TopicSubscriptions.List request = fcm.topicSubscriptions().list(parameters ...)}
+       * 
+ * + * @return the resource collection + */ + public TopicSubscriptions topicSubscriptions() { + return new TopicSubscriptions(); + } + + /** + * The "topicSubscriptions" collection of methods. + */ + public class TopicSubscriptions { + + /** + * Creates a TopicSubscription. Subscribes an app installation instance (by registration_id, either + * FID or FCM Token) to a topicSubscription. Returns a TopicSubscription if it is created + * successfully. If the subscription already exists, returns error of ALREADY_EXISTS. + * + * Create a request for the method "topicSubscriptions.create". + * + * This request holds the parameters needed by the fcm server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent resource where this subscription will be created. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID or + * an FCM Token. + * @param content the {@link com.google.api.services.fcm.v1.model.TopicSubscription} + * @return the request + */ + public Create create(java.lang.String parent, com.google.api.services.fcm.v1.model.TopicSubscription content) throws java.io.IOException { + Create result = new Create(parent, content); + initialize(result); + return result; + } + + public class Create extends FirebaseCloudMessagingRequest { + + private static final String REST_PATH = "v1/{+parent}/topicSubscriptions"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/registrations/[^/]+$"); + + /** + * Creates a TopicSubscription. Subscribes an app installation instance (by registration_id, + * either FID or FCM Token) to a topicSubscription. Returns a TopicSubscription if it is created + * successfully. If the subscription already exists, returns error of ALREADY_EXISTS. + * + * Create a request for the method "topicSubscriptions.create". + * + * This request holds the parameters needed by the the fcm server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation.

{@link + * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent resource where this subscription will be created. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID or + * an FCM Token. + * @param content the {@link com.google.api.services.fcm.v1.model.TopicSubscription} + * @since 1.13 + */ + protected Create(java.lang.String parent, com.google.api.services.fcm.v1.model.TopicSubscription content) { + super(FirebaseCloudMessaging.this, "POST", REST_PATH, content, com.google.api.services.fcm.v1.model.TopicSubscription.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+$"); + } + } + + @Override + public Create set$Xgafv(java.lang.String $Xgafv) { + return (Create) super.set$Xgafv($Xgafv); + } + + @Override + public Create setAccessToken(java.lang.String accessToken) { + return (Create) super.setAccessToken(accessToken); + } + + @Override + public Create setAlt(java.lang.String alt) { + return (Create) super.setAlt(alt); + } + + @Override + public Create setCallback(java.lang.String callback) { + return (Create) super.setCallback(callback); + } + + @Override + public Create setFields(java.lang.String fields) { + return (Create) super.setFields(fields); + } + + @Override + public Create setKey(java.lang.String key) { + return (Create) super.setKey(key); + } + + @Override + public Create setOauthToken(java.lang.String oauthToken) { + return (Create) super.setOauthToken(oauthToken); + } + + @Override + public Create setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Create) super.setPrettyPrint(prettyPrint); + } + + @Override + public Create setQuotaUser(java.lang.String quotaUser) { + return (Create) super.setQuotaUser(quotaUser); + } + + @Override + public Create setUploadType(java.lang.String uploadType) { + return (Create) super.setUploadType(uploadType); + } + + @Override + public Create setUploadProtocol(java.lang.String uploadProtocol) { + return (Create) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent resource where this subscription will be created. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID + * or an FCM Token. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent resource where this subscription will be created. Format: + projects/{project}/registrations/{registration} The {registration} part can be an FID or an FCM + Token. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent resource where this subscription will be created. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID + * or an FCM Token. + */ + public Create setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** + * Required. The ID to use for the subscription, which is the topic name. This will become + * the last segment of the TopicSubscription's resource name. Topic names match the + * pattern of "[a-zA-Z0-9-_.~%]{1,900}". + */ + @com.google.api.client.util.Key + private java.lang.String topicName; + + /** Required. The ID to use for the subscription, which is the topic name. This will become the last + segment of the TopicSubscription's resource name. Topic names match the pattern of + "[a-zA-Z0-9-_.~%]{1,900}". + */ + public java.lang.String getTopicName() { + return topicName; + } + + /** + * Required. The ID to use for the subscription, which is the topic name. This will become + * the last segment of the TopicSubscription's resource name. Topic names match the + * pattern of "[a-zA-Z0-9-_.~%]{1,900}". + */ + public Create setTopicName(java.lang.String topicName) { + this.topicName = topicName; + return this; + } + + @Override + public Create set(String parameterName, Object value) { + return (Create) super.set(parameterName, value); + } + } + /** + * Deletes a TopicSubscription. + * + * Create a request for the method "topicSubscriptions.delete". + * + * This request holds the parameters needed by the fcm server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the topic subscription to delete. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + * @return the request + */ + public Delete delete(java.lang.String name) throws java.io.IOException { + Delete result = new Delete(name); + initialize(result); + return result; + } + + public class Delete extends FirebaseCloudMessagingRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + + /** + * Deletes a TopicSubscription. + * + * Create a request for the method "topicSubscriptions.delete". + * + * This request holds the parameters needed by the the fcm server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link + * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The name of the topic subscription to delete. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + * @since 1.13 + */ + protected Delete(java.lang.String name) { + super(FirebaseCloudMessaging.this, "DELETE", REST_PATH, null, com.google.api.services.fcm.v1.model.Empty.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + } + } + + @Override + public Delete set$Xgafv(java.lang.String $Xgafv) { + return (Delete) super.set$Xgafv($Xgafv); + } + + @Override + public Delete setAccessToken(java.lang.String accessToken) { + return (Delete) super.setAccessToken(accessToken); + } + + @Override + public Delete setAlt(java.lang.String alt) { + return (Delete) super.setAlt(alt); + } + + @Override + public Delete setCallback(java.lang.String callback) { + return (Delete) super.setCallback(callback); + } + + @Override + public Delete setFields(java.lang.String fields) { + return (Delete) super.setFields(fields); + } + + @Override + public Delete setKey(java.lang.String key) { + return (Delete) super.setKey(key); + } + + @Override + public Delete setOauthToken(java.lang.String oauthToken) { + return (Delete) super.setOauthToken(oauthToken); + } + + @Override + public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Delete) super.setPrettyPrint(prettyPrint); + } + + @Override + public Delete setQuotaUser(java.lang.String quotaUser) { + return (Delete) super.setQuotaUser(quotaUser); + } + + @Override + public Delete setUploadType(java.lang.String uploadType) { + return (Delete) super.setUploadType(uploadType); + } + + @Override + public Delete setUploadProtocol(java.lang.String uploadProtocol) { + return (Delete) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the topic subscription to delete. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the topic subscription to delete. Format: + projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the topic subscription to delete. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + */ + public Delete setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + } + this.name = name; + return this; + } + + /** + * Optional. If set to true, and the topic subscription is not found, the request will + * succeed but no action will be taken on the server. + */ + @com.google.api.client.util.Key + private java.lang.Boolean allowMissing; + + /** Optional. If set to true, and the topic subscription is not found, the request will succeed but no + action will be taken on the server. + */ + public java.lang.Boolean getAllowMissing() { + return allowMissing; + } + + /** + * Optional. If set to true, and the topic subscription is not found, the request will + * succeed but no action will be taken on the server. + */ + public Delete setAllowMissing(java.lang.Boolean allowMissing) { + this.allowMissing = allowMissing; + return this; + } + + @Override + public Delete set(String parameterName, Object value) { + return (Delete) super.set(parameterName, value); + } + } + /** + * Gets a TopicSubscription. + * + * Create a request for the method "topicSubscriptions.get". + * + * This request holds the parameters needed by the fcm server. After setting any optional + * parameters, call the {@link Get#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the topic subscription to retrieve. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + * @return the request + */ + public Get get(java.lang.String name) throws java.io.IOException { + Get result = new Get(name); + initialize(result); + return result; + } + + public class Get extends FirebaseCloudMessagingRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + + /** + * Gets a TopicSubscription. + * + * Create a request for the method "topicSubscriptions.get". + * + * This request holds the parameters needed by the the fcm server. After setting any optional + * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link + * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The name of the topic subscription to retrieve. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + * @since 1.13 + */ + protected Get(java.lang.String name) { + super(FirebaseCloudMessaging.this, "GET", REST_PATH, null, com.google.api.services.fcm.v1.model.TopicSubscription.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public Get set$Xgafv(java.lang.String $Xgafv) { + return (Get) super.set$Xgafv($Xgafv); + } + + @Override + public Get setAccessToken(java.lang.String accessToken) { + return (Get) super.setAccessToken(accessToken); + } + + @Override + public Get setAlt(java.lang.String alt) { + return (Get) super.setAlt(alt); + } + + @Override + public Get setCallback(java.lang.String callback) { + return (Get) super.setCallback(callback); + } + + @Override + public Get setFields(java.lang.String fields) { + return (Get) super.setFields(fields); + } + + @Override + public Get setKey(java.lang.String key) { + return (Get) super.setKey(key); + } + + @Override + public Get setOauthToken(java.lang.String oauthToken) { + return (Get) super.setOauthToken(oauthToken); + } + + @Override + public Get setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Get) super.setPrettyPrint(prettyPrint); + } + + @Override + public Get setQuotaUser(java.lang.String quotaUser) { + return (Get) super.setQuotaUser(quotaUser); + } + + @Override + public Get setUploadType(java.lang.String uploadType) { + return (Get) super.setUploadType(uploadType); + } + + @Override + public Get setUploadProtocol(java.lang.String uploadProtocol) { + return (Get) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the topic subscription to retrieve. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the topic subscription to retrieve. Format: + projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the topic subscription to retrieve. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + */ + public Get setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Get set(String parameterName, Object value) { + return (Get) super.set(parameterName, value); + } + } + /** + * Lists TopicSubscriptions for a given app instance. + * + * Create a request for the method "topicSubscriptions.list". + * + * This request holds the parameters needed by the fcm server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent resource, which owns this collection of subscriptions. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID or + * an FCM Token. + * @return the request + */ + public List list(java.lang.String parent) throws java.io.IOException { + List result = new List(parent); + initialize(result); + return result; + } + + public class List extends FirebaseCloudMessagingRequest { + + private static final String REST_PATH = "v1/{+parent}/topicSubscriptions"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/registrations/[^/]+$"); + + /** + * Lists TopicSubscriptions for a given app instance. + * + * Create a request for the method "topicSubscriptions.list". + * + * This request holds the parameters needed by the the fcm server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link + * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent resource, which owns this collection of subscriptions. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID or + * an FCM Token. + * @since 1.13 + */ + protected List(java.lang.String parent) { + super(FirebaseCloudMessaging.this, "GET", REST_PATH, null, com.google.api.services.fcm.v1.model.ListTopicSubscriptionsResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public List set$Xgafv(java.lang.String $Xgafv) { + return (List) super.set$Xgafv($Xgafv); + } + + @Override + public List setAccessToken(java.lang.String accessToken) { + return (List) super.setAccessToken(accessToken); + } + + @Override + public List setAlt(java.lang.String alt) { + return (List) super.setAlt(alt); + } + + @Override + public List setCallback(java.lang.String callback) { + return (List) super.setCallback(callback); + } + + @Override + public List setFields(java.lang.String fields) { + return (List) super.setFields(fields); + } + + @Override + public List setKey(java.lang.String key) { + return (List) super.setKey(key); + } + + @Override + public List setOauthToken(java.lang.String oauthToken) { + return (List) super.setOauthToken(oauthToken); + } + + @Override + public List setPrettyPrint(java.lang.Boolean prettyPrint) { + return (List) super.setPrettyPrint(prettyPrint); + } + + @Override + public List setQuotaUser(java.lang.String quotaUser) { + return (List) super.setQuotaUser(quotaUser); + } + + @Override + public List setUploadType(java.lang.String uploadType) { + return (List) super.setUploadType(uploadType); + } + + @Override + public List setUploadProtocol(java.lang.String uploadProtocol) { + return (List) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent resource, which owns this collection of subscriptions. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID + * or an FCM Token. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent resource, which owns this collection of subscriptions. Format: + projects/{project}/registrations/{registration} The {registration} part can be an FID or an FCM + Token. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent resource, which owns this collection of subscriptions. Format: + * projects/{project}/registrations/{registration} The {registration} part can be an FID + * or an FCM Token. + */ + public List setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** + * Optional. The maximum number of subscriptions to return. The service may return fewer + * than this value. If unspecified, at most 1000 subscriptions will be returned. The + * maximum value is 2000; values above 2000 will be coerced to 2000. + */ + @com.google.api.client.util.Key + private java.lang.Integer pageSize; + + /** Optional. The maximum number of subscriptions to return. The service may return fewer than this + value. If unspecified, at most 1000 subscriptions will be returned. The maximum value is 2000; + values above 2000 will be coerced to 2000. + */ + public java.lang.Integer getPageSize() { + return pageSize; + } + + /** + * Optional. The maximum number of subscriptions to return. The service may return fewer + * than this value. If unspecified, at most 1000 subscriptions will be returned. The + * maximum value is 2000; values above 2000 will be coerced to 2000. + */ + public List setPageSize(java.lang.Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Optional. A page token, received from a previous `ListTopicSubscriptions` call. Provide + * this to retrieve the subsequent page. + */ + @com.google.api.client.util.Key + private java.lang.String pageToken; + + /** Optional. A page token, received from a previous `ListTopicSubscriptions` call. Provide this to + retrieve the subsequent page. + */ + public java.lang.String getPageToken() { + return pageToken; + } + + /** + * Optional. A page token, received from a previous `ListTopicSubscriptions` call. Provide + * this to retrieve the subsequent page. + */ + public List setPageToken(java.lang.String pageToken) { + this.pageToken = pageToken; + return this; + } + + @Override + public List set(String parameterName, Object value) { + return (List) super.set(parameterName, value); + } + } + /** + * Updates a TopicSubscription. Subscribes an app installation instance by registration_id, either + * FID or FCM Token, to a topicSubscription. Returns an existing TopicSubscription or creates a new + * one if it does not exist. + * + * Create a request for the method "topicSubscriptions.patch". + * + * This request holds the parameters needed by the fcm server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation. + * + * @param name Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} The + * {registration} part contains the registration ID (e.g., FID). + * @param content the {@link com.google.api.services.fcm.v1.model.TopicSubscription} + * @return the request + */ + public Patch patch(java.lang.String name, com.google.api.services.fcm.v1.model.TopicSubscription content) throws java.io.IOException { + Patch result = new Patch(name, content); + initialize(result); + return result; + } + + public class Patch extends FirebaseCloudMessagingRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + + /** + * Updates a TopicSubscription. Subscribes an app installation instance by registration_id, either + * FID or FCM Token, to a topicSubscription. Returns an existing TopicSubscription or creates a + * new one if it does not exist. + * + * Create a request for the method "topicSubscriptions.patch". + * + * This request holds the parameters needed by the the fcm server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

{@link + * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} The + * {registration} part contains the registration ID (e.g., FID). + * @param content the {@link com.google.api.services.fcm.v1.model.TopicSubscription} + * @since 1.13 + */ + protected Patch(java.lang.String name, com.google.api.services.fcm.v1.model.TopicSubscription content) { + super(FirebaseCloudMessaging.this, "PATCH", REST_PATH, content, com.google.api.services.fcm.v1.model.TopicSubscription.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + } + } + + @Override + public Patch set$Xgafv(java.lang.String $Xgafv) { + return (Patch) super.set$Xgafv($Xgafv); + } + + @Override + public Patch setAccessToken(java.lang.String accessToken) { + return (Patch) super.setAccessToken(accessToken); + } + + @Override + public Patch setAlt(java.lang.String alt) { + return (Patch) super.setAlt(alt); + } + + @Override + public Patch setCallback(java.lang.String callback) { + return (Patch) super.setCallback(callback); + } + + @Override + public Patch setFields(java.lang.String fields) { + return (Patch) super.setFields(fields); + } + + @Override + public Patch setKey(java.lang.String key) { + return (Patch) super.setKey(key); + } + + @Override + public Patch setOauthToken(java.lang.String oauthToken) { + return (Patch) super.setOauthToken(oauthToken); + } + + @Override + public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Patch) super.setPrettyPrint(prettyPrint); + } + + @Override + public Patch setQuotaUser(java.lang.String quotaUser) { + return (Patch) super.setQuotaUser(quotaUser); + } + + @Override + public Patch setUploadType(java.lang.String uploadType) { + return (Patch) super.setUploadType(uploadType); + } + + @Override + public Patch setUploadProtocol(java.lang.String uploadProtocol) { + return (Patch) super.setUploadProtocol(uploadProtocol); + } + + /** + * Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + * The {registration} part contains the registration ID (e.g., FID). + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Identifier. The resource name of the subscription. Format: + projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} The + {registration} part contains the registration ID (e.g., FID). + */ + public java.lang.String getName() { + return name; + } + + /** + * Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} + * The {registration} part contains the registration ID (e.g., FID). + */ + public Patch setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/registrations/[^/]+/topicSubscriptions/[^/]+$"); + } + this.name = name; + return this; + } + + /** + * Optional. If set to true, and the topic subscription is not found, a new topic + * subscription will be created. + */ + @com.google.api.client.util.Key + private java.lang.Boolean allowMissing; + + /** Optional. If set to true, and the topic subscription is not found, a new topic subscription will be + created. + */ + public java.lang.Boolean getAllowMissing() { + return allowMissing; + } + + /** + * Optional. If set to true, and the topic subscription is not found, a new topic + * subscription will be created. + */ + public Patch setAllowMissing(java.lang.Boolean allowMissing) { + this.allowMissing = allowMissing; + return this; + } + + @Override + public Patch set(String parameterName, Object value) { + return (Patch) super.set(parameterName, value); + } + } + + } + } } /** diff --git a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Empty.java b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Empty.java new file mode 100644 index 00000000000..2af1a36c9b4 --- /dev/null +++ b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Empty.java @@ -0,0 +1,45 @@ +/* + * 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 + * + * http://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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.fcm.v1.model; + +/** + * A generic empty message that you can re-use to avoid defining duplicated empty messages in your + * APIs. A typical example is to use it as the request or the response type of an API method. For + * instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Firebase Cloud Messaging API. For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class Empty extends com.google.api.client.json.GenericJson { + + @Override + public Empty set(String fieldName, Object value) { + return (Empty) super.set(fieldName, value); + } + + @Override + public Empty clone() { + return (Empty) super.clone(); + } + +} diff --git a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/ListTopicSubscriptionsResponse.java b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/ListTopicSubscriptionsResponse.java new file mode 100644 index 00000000000..e7378f0f7a6 --- /dev/null +++ b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/ListTopicSubscriptionsResponse.java @@ -0,0 +1,94 @@ +/* + * 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 + * + * http://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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.fcm.v1.model; + +/** + * Response message for ListTopicSubscriptions. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Firebase Cloud Messaging API. For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ListTopicSubscriptionsResponse extends com.google.api.client.json.GenericJson { + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String nextPageToken; + + /** + * The topic subscriptions for the instance. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List topicSubscriptions; + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @return value or {@code null} for none + */ + public java.lang.String getNextPageToken() { + return nextPageToken; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @param nextPageToken nextPageToken or {@code null} for none + */ + public ListTopicSubscriptionsResponse setNextPageToken(java.lang.String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** + * The topic subscriptions for the instance. + * @return value or {@code null} for none + */ + public java.util.List getTopicSubscriptions() { + return topicSubscriptions; + } + + /** + * The topic subscriptions for the instance. + * @param topicSubscriptions topicSubscriptions or {@code null} for none + */ + public ListTopicSubscriptionsResponse setTopicSubscriptions(java.util.List topicSubscriptions) { + this.topicSubscriptions = topicSubscriptions; + return this; + } + + @Override + public ListTopicSubscriptionsResponse set(String fieldName, Object value) { + return (ListTopicSubscriptionsResponse) super.set(fieldName, value); + } + + @Override + public ListTopicSubscriptionsResponse clone() { + return (ListTopicSubscriptionsResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Message.java b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Message.java index b7974a420bd..58292cb2986 100644 --- a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Message.java +++ b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/Message.java @@ -71,7 +71,8 @@ public final class Message extends com.google.api.client.json.GenericJson { private FcmOptions fcmOptions; /** - * Firebase Installation ID to send a message to. + * [Firebase Installation ID (FID)](/docs/cloud-messaging/android/get-started#access-firebase- + * installation-id) to send a message to. * The value may be {@code null}. */ @com.google.api.client.util.Key @@ -93,8 +94,8 @@ public final class Message extends com.google.api.client.json.GenericJson { private Notification notification; /** - * Deprecated: Use `fid` instead. Registration token to send a message to. During the transition - * period, this field also accepts a Firebase Installation ID (FID). + * Deprecated: Use `fid` instead. During the transition period, this field also accepts a Firebase + * Installation ID (FID). Registration token to send a message to. * The value may be {@code null}. */ @com.google.api.client.util.Key @@ -211,7 +212,8 @@ public Message setFcmOptions(FcmOptions fcmOptions) { } /** - * Firebase Installation ID to send a message to. + * [Firebase Installation ID (FID)](/docs/cloud-messaging/android/get-started#access-firebase- + * installation-id) to send a message to. * @return value or {@code null} for none */ public java.lang.String getFid() { @@ -219,7 +221,8 @@ public java.lang.String getFid() { } /** - * Firebase Installation ID to send a message to. + * [Firebase Installation ID (FID)](/docs/cloud-messaging/android/get-started#access-firebase- + * installation-id) to send a message to. * @param fid fid or {@code null} for none */ public Message setFid(java.lang.String fid) { @@ -264,8 +267,8 @@ public Message setNotification(Notification notification) { } /** - * Deprecated: Use `fid` instead. Registration token to send a message to. During the transition - * period, this field also accepts a Firebase Installation ID (FID). + * Deprecated: Use `fid` instead. During the transition period, this field also accepts a Firebase + * Installation ID (FID). Registration token to send a message to. * @return value or {@code null} for none */ public java.lang.String getToken() { @@ -273,8 +276,8 @@ public java.lang.String getToken() { } /** - * Deprecated: Use `fid` instead. Registration token to send a message to. During the transition - * period, this field also accepts a Firebase Installation ID (FID). + * Deprecated: Use `fid` instead. During the transition period, this field also accepts a Firebase + * Installation ID (FID). Registration token to send a message to. * @param token token or {@code null} for none */ public Message setToken(java.lang.String token) { diff --git a/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/TopicSubscription.java b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/TopicSubscription.java new file mode 100644 index 00000000000..b112fde3c21 --- /dev/null +++ b/clients/google-api-services-fcm/v1/2.0.0/com/google/api/services/fcm/v1/model/TopicSubscription.java @@ -0,0 +1,127 @@ +/* + * 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 + * + * http://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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.fcm.v1.model; + +/** + * Represents a subscription of a single app instance to a single FCM topic. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Firebase Cloud Messaging API. For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class TopicSubscription extends com.google.api.client.json.GenericJson { + + /** + * Output only. Time when the subscription was created. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String createTime; + + /** + * Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} The + * {registration} part contains the registration ID (e.g., FID). + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** + * Output only. The ID of the TopicSubscription, which is the topic name. This corresponds to the + * {topicSubscription} segment in the resource name. Topic names match the pattern of + * "[a-zA-Z0-9-_.~%]{1,900}". + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String topicName; + + /** + * Output only. Time when the subscription was created. + * @return value or {@code null} for none + */ + public String getCreateTime() { + return createTime; + } + + /** + * Output only. Time when the subscription was created. + * @param createTime createTime or {@code null} for none + */ + public TopicSubscription setCreateTime(String createTime) { + this.createTime = createTime; + return this; + } + + /** + * Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} The + * {registration} part contains the registration ID (e.g., FID). + * @return value or {@code null} for none + */ + public java.lang.String getName() { + return name; + } + + /** + * Identifier. The resource name of the subscription. Format: + * projects/{project}/registrations/{registration}/topicSubscriptions/{topicSubscription} The + * {registration} part contains the registration ID (e.g., FID). + * @param name name or {@code null} for none + */ + public TopicSubscription setName(java.lang.String name) { + this.name = name; + return this; + } + + /** + * Output only. The ID of the TopicSubscription, which is the topic name. This corresponds to the + * {topicSubscription} segment in the resource name. Topic names match the pattern of + * "[a-zA-Z0-9-_.~%]{1,900}". + * @return value or {@code null} for none + */ + public java.lang.String getTopicName() { + return topicName; + } + + /** + * Output only. The ID of the TopicSubscription, which is the topic name. This corresponds to the + * {topicSubscription} segment in the resource name. Topic names match the pattern of + * "[a-zA-Z0-9-_.~%]{1,900}". + * @param topicName topicName or {@code null} for none + */ + public TopicSubscription setTopicName(java.lang.String topicName) { + this.topicName = topicName; + return this; + } + + @Override + public TopicSubscription set(String fieldName, Object value) { + return (TopicSubscription) super.set(fieldName, value); + } + + @Override + public TopicSubscription clone() { + return (TopicSubscription) super.clone(); + } + +} diff --git a/clients/google-api-services-fcm/v1/2.0.0/pom.xml b/clients/google-api-services-fcm/v1/2.0.0/pom.xml index 3e137d86da1..b100d8acbc0 100644 --- a/clients/google-api-services-fcm/v1/2.0.0/pom.xml +++ b/clients/google-api-services-fcm/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-fcm - v1-rev20260619-2.0.0 - Firebase Cloud Messaging API v1-rev20260619-2.0.0 + v1-rev20260911-2.0.0 + Firebase Cloud Messaging API v1-rev20260911-2.0.0 jar 2011 diff --git a/clients/google-api-services-fcm/v1/README.md b/clients/google-api-services-fcm/v1/README.md index 55b4f531e52..6fd4e014eae 100644 --- a/clients/google-api-services-fcm/v1/README.md +++ b/clients/google-api-services-fcm/v1/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-fcm - v1-rev20260619-2.0.0 + v1-rev20260911-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-fcm:v1-rev20260619-2.0.0' + implementation 'com.google.apis:google-api-services-fcm:v1-rev20260911-2.0.0' } ```