Class: Google::Apis::FcmV1::WebpushConfig
- Inherits:
-
Object
- Object
- Google::Apis::FcmV1::WebpushConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/fcm_v1/classes.rb,
generated/google/apis/fcm_v1/representations.rb,
generated/google/apis/fcm_v1/representations.rb
Overview
Webpush protocol options.
Instance Attribute Summary collapse
-
#data ⇒ Hash<String,String>
Arbitrary key/value payload.
-
#fcm_options ⇒ Google::Apis::FcmV1::WebpushFcmOptions
Options for features provided by the FCM SDK for Web.
-
#headers ⇒ Hash<String,String>
HTTP headers defined in webpush protocol.
-
#notification ⇒ Hash<String,Object>
Web Notification options as a JSON object.
Instance Method Summary collapse
-
#initialize(**args) ⇒ WebpushConfig
constructor
A new instance of WebpushConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ WebpushConfig
Returns a new instance of WebpushConfig.
927 928 929 |
# File 'generated/google/apis/fcm_v1/classes.rb', line 927 def initialize(**args) update!(**args) end |
Instance Attribute Details
#data ⇒ Hash<String,String>
Arbitrary key/value payload. If present, it will override
google.firebase.fcm.v1.Message.data.
Corresponds to the JSON property data
903 904 905 |
# File 'generated/google/apis/fcm_v1/classes.rb', line 903 def data @data end |
#fcm_options ⇒ Google::Apis::FcmV1::WebpushFcmOptions
Options for features provided by the FCM SDK for Web.
Corresponds to the JSON property fcmOptions
908 909 910 |
# File 'generated/google/apis/fcm_v1/classes.rb', line 908 def @fcm_options end |
#headers ⇒ Hash<String,String>
HTTP headers defined in webpush protocol. Refer to
Webpush protocol for
supported headers, e.g. "TTL": "15".
Corresponds to the JSON property headers
915 916 917 |
# File 'generated/google/apis/fcm_v1/classes.rb', line 915 def headers @headers end |
#notification ⇒ Hash<String,Object>
Web Notification options as a JSON object. Supports Notification instance
properties as defined in Web Notification
API. If
present, "title" and "body" fields override
[google.firebase.fcm.v1.Notification.title] and
[google.firebase.fcm.v1.Notification.body].
Corresponds to the JSON property notification
925 926 927 |
# File 'generated/google/apis/fcm_v1/classes.rb', line 925 def notification @notification end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
932 933 934 935 936 937 |
# File 'generated/google/apis/fcm_v1/classes.rb', line 932 def update!(**args) @data = args[:data] if args.key?(:data) @fcm_options = args[:fcm_options] if args.key?(:fcm_options) @headers = args[:headers] if args.key?(:headers) @notification = args[:notification] if args.key?(:notification) end |