All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.fcm.v1.model.AndroidConfig Maven / Gradle / Ivy

/*
 * Copyright 2010 Google Inc.
 *
 * 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/google/apis-client-generator/
 * (build: 2018-10-08 17:45:39 UTC)
 * on 2019-06-11 at 00:20:04 UTC 
 * Modify at your own risk.
 */

package com.google.api.services.fcm.v1.model;

/**
 * Android specific options for messages sent through [FCM connection
 * server](https://goo.gl/4GLdUl).
 *
 * 

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 AndroidConfig extends com.google.api.client.json.GenericJson { /** * An identifier of a group of messages that can be collapsed, so that only the last message gets * sent when delivery can be resumed. A maximum of 4 different collapse keys is allowed at any * given time. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String collapseKey; /** * Arbitrary key/value payload. If present, it will override google.firebase.fcm.v1.Message.data. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.Map data; /** * Options for features provided by the FCM SDK for Android. * The value may be {@code null}. */ @com.google.api.client.util.Key private AndroidFcmOptions fcmOptions; /** * Notification to send to android devices. * The value may be {@code null}. */ @com.google.api.client.util.Key private AndroidNotification notification; /** * Message priority. Can take "normal" and "high" values. For more information, see [Setting the * priority of a message](https://goo.gl/GjONJv). * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String priority; /** * Package name of the application where the registration token must match in order to receive the * message. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String restrictedPackageName; /** * How long (in seconds) the message should be kept in FCM storage if the device is offline. The * maximum time to live supported is 4 weeks, and the default value is 4 weeks if not set. Set it * to 0 if want to send the message immediately. In JSON format, the Duration type is encoded as a * string rather than an object, where the string ends in the suffix "s" (indicating seconds) and * is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For * example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds * and 1 nanosecond should be expressed in JSON format as "3.000000001s". The ttl will be rounded * down to the nearest second. * The value may be {@code null}. */ @com.google.api.client.util.Key private String ttl; /** * An identifier of a group of messages that can be collapsed, so that only the last message gets * sent when delivery can be resumed. A maximum of 4 different collapse keys is allowed at any * given time. * @return value or {@code null} for none */ public java.lang.String getCollapseKey() { return collapseKey; } /** * An identifier of a group of messages that can be collapsed, so that only the last message gets * sent when delivery can be resumed. A maximum of 4 different collapse keys is allowed at any * given time. * @param collapseKey collapseKey or {@code null} for none */ public AndroidConfig setCollapseKey(java.lang.String collapseKey) { this.collapseKey = collapseKey; return this; } /** * Arbitrary key/value payload. If present, it will override google.firebase.fcm.v1.Message.data. * @return value or {@code null} for none */ public java.util.Map getData() { return data; } /** * Arbitrary key/value payload. If present, it will override google.firebase.fcm.v1.Message.data. * @param data data or {@code null} for none */ public AndroidConfig setData(java.util.Map data) { this.data = data; return this; } /** * Options for features provided by the FCM SDK for Android. * @return value or {@code null} for none */ public AndroidFcmOptions getFcmOptions() { return fcmOptions; } /** * Options for features provided by the FCM SDK for Android. * @param fcmOptions fcmOptions or {@code null} for none */ public AndroidConfig setFcmOptions(AndroidFcmOptions fcmOptions) { this.fcmOptions = fcmOptions; return this; } /** * Notification to send to android devices. * @return value or {@code null} for none */ public AndroidNotification getNotification() { return notification; } /** * Notification to send to android devices. * @param notification notification or {@code null} for none */ public AndroidConfig setNotification(AndroidNotification notification) { this.notification = notification; return this; } /** * Message priority. Can take "normal" and "high" values. For more information, see [Setting the * priority of a message](https://goo.gl/GjONJv). * @return value or {@code null} for none */ public java.lang.String getPriority() { return priority; } /** * Message priority. Can take "normal" and "high" values. For more information, see [Setting the * priority of a message](https://goo.gl/GjONJv). * @param priority priority or {@code null} for none */ public AndroidConfig setPriority(java.lang.String priority) { this.priority = priority; return this; } /** * Package name of the application where the registration token must match in order to receive the * message. * @return value or {@code null} for none */ public java.lang.String getRestrictedPackageName() { return restrictedPackageName; } /** * Package name of the application where the registration token must match in order to receive the * message. * @param restrictedPackageName restrictedPackageName or {@code null} for none */ public AndroidConfig setRestrictedPackageName(java.lang.String restrictedPackageName) { this.restrictedPackageName = restrictedPackageName; return this; } /** * How long (in seconds) the message should be kept in FCM storage if the device is offline. The * maximum time to live supported is 4 weeks, and the default value is 4 weeks if not set. Set it * to 0 if want to send the message immediately. In JSON format, the Duration type is encoded as a * string rather than an object, where the string ends in the suffix "s" (indicating seconds) and * is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For * example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds * and 1 nanosecond should be expressed in JSON format as "3.000000001s". The ttl will be rounded * down to the nearest second. * @return value or {@code null} for none */ public String getTtl() { return ttl; } /** * How long (in seconds) the message should be kept in FCM storage if the device is offline. The * maximum time to live supported is 4 weeks, and the default value is 4 weeks if not set. Set it * to 0 if want to send the message immediately. In JSON format, the Duration type is encoded as a * string rather than an object, where the string ends in the suffix "s" (indicating seconds) and * is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For * example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds * and 1 nanosecond should be expressed in JSON format as "3.000000001s". The ttl will be rounded * down to the nearest second. * @param ttl ttl or {@code null} for none */ public AndroidConfig setTtl(String ttl) { this.ttl = ttl; return this; } @Override public AndroidConfig set(String fieldName, Object value) { return (AndroidConfig) super.set(fieldName, value); } @Override public AndroidConfig clone() { return (AndroidConfig) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy