[e3d4e0a] | 1 | <?php
|
---|
| 2 | /*
|
---|
| 3 | * Copyright 2014 Google Inc.
|
---|
| 4 | *
|
---|
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
| 6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
| 7 | * the License at
|
---|
| 8 | *
|
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
| 10 | *
|
---|
| 11 | * Unless required by applicable law or agreed to in writing, software
|
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
| 14 | * License for the specific language governing permissions and limitations under
|
---|
| 15 | * the License.
|
---|
| 16 | */
|
---|
| 17 |
|
---|
| 18 | namespace Google\Service\FirebaseCloudMessaging;
|
---|
| 19 |
|
---|
| 20 | class Message extends \Google\Model
|
---|
| 21 | {
|
---|
| 22 | protected $androidType = AndroidConfig::class;
|
---|
| 23 | protected $androidDataType = '';
|
---|
| 24 | protected $apnsType = ApnsConfig::class;
|
---|
| 25 | protected $apnsDataType = '';
|
---|
| 26 | /**
|
---|
| 27 | * @var string
|
---|
| 28 | */
|
---|
| 29 | public $condition;
|
---|
| 30 | /**
|
---|
| 31 | * @var string[]
|
---|
| 32 | */
|
---|
| 33 | public $data;
|
---|
| 34 | protected $fcmOptionsType = FcmOptions::class;
|
---|
| 35 | protected $fcmOptionsDataType = '';
|
---|
| 36 | /**
|
---|
| 37 | * @var string
|
---|
| 38 | */
|
---|
| 39 | public $name;
|
---|
| 40 | protected $notificationType = Notification::class;
|
---|
| 41 | protected $notificationDataType = '';
|
---|
| 42 | /**
|
---|
| 43 | * @var string
|
---|
| 44 | */
|
---|
| 45 | public $token;
|
---|
| 46 | /**
|
---|
| 47 | * @var string
|
---|
| 48 | */
|
---|
| 49 | public $topic;
|
---|
| 50 | protected $webpushType = WebpushConfig::class;
|
---|
| 51 | protected $webpushDataType = '';
|
---|
| 52 |
|
---|
| 53 | /**
|
---|
| 54 | * @param AndroidConfig
|
---|
| 55 | */
|
---|
| 56 | public function setAndroid(AndroidConfig $android)
|
---|
| 57 | {
|
---|
| 58 | $this->android = $android;
|
---|
| 59 | }
|
---|
| 60 | /**
|
---|
| 61 | * @return AndroidConfig
|
---|
| 62 | */
|
---|
| 63 | public function getAndroid()
|
---|
| 64 | {
|
---|
| 65 | return $this->android;
|
---|
| 66 | }
|
---|
| 67 | /**
|
---|
| 68 | * @param ApnsConfig
|
---|
| 69 | */
|
---|
| 70 | public function setApns(ApnsConfig $apns)
|
---|
| 71 | {
|
---|
| 72 | $this->apns = $apns;
|
---|
| 73 | }
|
---|
| 74 | /**
|
---|
| 75 | * @return ApnsConfig
|
---|
| 76 | */
|
---|
| 77 | public function getApns()
|
---|
| 78 | {
|
---|
| 79 | return $this->apns;
|
---|
| 80 | }
|
---|
| 81 | /**
|
---|
| 82 | * @param string
|
---|
| 83 | */
|
---|
| 84 | public function setCondition($condition)
|
---|
| 85 | {
|
---|
| 86 | $this->condition = $condition;
|
---|
| 87 | }
|
---|
| 88 | /**
|
---|
| 89 | * @return string
|
---|
| 90 | */
|
---|
| 91 | public function getCondition()
|
---|
| 92 | {
|
---|
| 93 | return $this->condition;
|
---|
| 94 | }
|
---|
| 95 | /**
|
---|
| 96 | * @param string[]
|
---|
| 97 | */
|
---|
| 98 | public function setData($data)
|
---|
| 99 | {
|
---|
| 100 | $this->data = $data;
|
---|
| 101 | }
|
---|
| 102 | /**
|
---|
| 103 | * @return string[]
|
---|
| 104 | */
|
---|
| 105 | public function getData()
|
---|
| 106 | {
|
---|
| 107 | return $this->data;
|
---|
| 108 | }
|
---|
| 109 | /**
|
---|
| 110 | * @param FcmOptions
|
---|
| 111 | */
|
---|
| 112 | public function setFcmOptions(FcmOptions $fcmOptions)
|
---|
| 113 | {
|
---|
| 114 | $this->fcmOptions = $fcmOptions;
|
---|
| 115 | }
|
---|
| 116 | /**
|
---|
| 117 | * @return FcmOptions
|
---|
| 118 | */
|
---|
| 119 | public function getFcmOptions()
|
---|
| 120 | {
|
---|
| 121 | return $this->fcmOptions;
|
---|
| 122 | }
|
---|
| 123 | /**
|
---|
| 124 | * @param string
|
---|
| 125 | */
|
---|
| 126 | public function setName($name)
|
---|
| 127 | {
|
---|
| 128 | $this->name = $name;
|
---|
| 129 | }
|
---|
| 130 | /**
|
---|
| 131 | * @return string
|
---|
| 132 | */
|
---|
| 133 | public function getName()
|
---|
| 134 | {
|
---|
| 135 | return $this->name;
|
---|
| 136 | }
|
---|
| 137 | /**
|
---|
| 138 | * @param Notification
|
---|
| 139 | */
|
---|
| 140 | public function setNotification(Notification $notification)
|
---|
| 141 | {
|
---|
| 142 | $this->notification = $notification;
|
---|
| 143 | }
|
---|
| 144 | /**
|
---|
| 145 | * @return Notification
|
---|
| 146 | */
|
---|
| 147 | public function getNotification()
|
---|
| 148 | {
|
---|
| 149 | return $this->notification;
|
---|
| 150 | }
|
---|
| 151 | /**
|
---|
| 152 | * @param string
|
---|
| 153 | */
|
---|
| 154 | public function setToken($token)
|
---|
| 155 | {
|
---|
| 156 | $this->token = $token;
|
---|
| 157 | }
|
---|
| 158 | /**
|
---|
| 159 | * @return string
|
---|
| 160 | */
|
---|
| 161 | public function getToken()
|
---|
| 162 | {
|
---|
| 163 | return $this->token;
|
---|
| 164 | }
|
---|
| 165 | /**
|
---|
| 166 | * @param string
|
---|
| 167 | */
|
---|
| 168 | public function setTopic($topic)
|
---|
| 169 | {
|
---|
| 170 | $this->topic = $topic;
|
---|
| 171 | }
|
---|
| 172 | /**
|
---|
| 173 | * @return string
|
---|
| 174 | */
|
---|
| 175 | public function getTopic()
|
---|
| 176 | {
|
---|
| 177 | return $this->topic;
|
---|
| 178 | }
|
---|
| 179 | /**
|
---|
| 180 | * @param WebpushConfig
|
---|
| 181 | */
|
---|
| 182 | public function setWebpush(WebpushConfig $webpush)
|
---|
| 183 | {
|
---|
| 184 | $this->webpush = $webpush;
|
---|
| 185 | }
|
---|
| 186 | /**
|
---|
| 187 | * @return WebpushConfig
|
---|
| 188 | */
|
---|
| 189 | public function getWebpush()
|
---|
| 190 | {
|
---|
| 191 | return $this->webpush;
|
---|
| 192 | }
|
---|
| 193 | }
|
---|
| 194 |
|
---|
| 195 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 196 | class_alias(Message::class, 'Google_Service_FirebaseCloudMessaging_Message');
|
---|