Class: Google::Apis::FcmV1::SendMessageRequest

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

Request to send a message to specified target.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SendMessageRequest

Returns a new instance of SendMessageRequest.



744
745
746
# File 'generated/google/apis/fcm_v1/classes.rb', line 744

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

Instance Attribute Details

#messageGoogle::Apis::FcmV1::Message

Message to send by Firebase Cloud Messaging Service. Corresponds to the JSON property message



736
737
738
# File 'generated/google/apis/fcm_v1/classes.rb', line 736

def message
  @message
end

#validate_onlyBoolean Also known as: validate_only?

Flag for testing the request without actually delivering the message. Corresponds to the JSON property validateOnly

Returns:

  • (Boolean)


741
742
743
# File 'generated/google/apis/fcm_v1/classes.rb', line 741

def validate_only
  @validate_only
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



749
750
751
752
# File 'generated/google/apis/fcm_v1/classes.rb', line 749

def update!(**args)
  @message = args[:message] if args.key?(:message)
  @validate_only = args[:validate_only] if args.key?(:validate_only)
end