Class: Google::Apis::FcmV1::WebpushConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WebpushConfig

Returns a new instance of WebpushConfig.



785
786
787
# File 'generated/google/apis/fcm_v1/classes.rb', line 785

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dataHash<String,String>

Arbitrary key/value payload. If present, it will override google.firebase.fcm. v1.Message.data. Corresponds to the JSON property data

Returns:

  • (Hash<String,String>)


763
764
765
# File 'generated/google/apis/fcm_v1/classes.rb', line 763

def data
  @data
end

#fcm_optionsGoogle::Apis::FcmV1::WebpushFcmOptions

Options for features provided by the FCM SDK for Web. Corresponds to the JSON property fcmOptions



768
769
770
# File 'generated/google/apis/fcm_v1/classes.rb', line 768

def fcm_options
  @fcm_options
end

#headersHash<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

Returns:

  • (Hash<String,String>)


774
775
776
# File 'generated/google/apis/fcm_v1/classes.rb', line 774

def headers
  @headers
end

#notificationHash<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

Returns:

  • (Hash<String,Object>)


783
784
785
# File 'generated/google/apis/fcm_v1/classes.rb', line 783

def notification
  @notification
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



790
791
792
793
794
795
# File 'generated/google/apis/fcm_v1/classes.rb', line 790

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