Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions src/FirebaseCloudMessaging.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class FirebaseCloudMessaging extends \Google\Service
"https://www.googleapis.com/auth/firebase.messaging";

public $projects_messages;
public $projects_registrations_topicSubscriptions;
public $rootUrlTemplate;

/**
Expand Down Expand Up @@ -83,6 +84,86 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
]
]
);
$this->projects_registrations_topicSubscriptions = new FirebaseCloudMessaging\Resource\ProjectsRegistrationsTopicSubscriptions(
$this,
$this->serviceName,
'topicSubscriptions',
[
'methods' => [
'create' => [
'path' => 'v1/{+parent}/topicSubscriptions',
'httpMethod' => 'POST',
'parameters' => [
'parent' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'topicName' => [
'location' => 'query',
'type' => 'string',
],
],
],'delete' => [
'path' => 'v1/{+name}',
'httpMethod' => 'DELETE',
'parameters' => [
'name' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'allowMissing' => [
'location' => 'query',
'type' => 'boolean',
],
],
],'get' => [
'path' => 'v1/{+name}',
'httpMethod' => 'GET',
'parameters' => [
'name' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'list' => [
'path' => 'v1/{+parent}/topicSubscriptions',
'httpMethod' => 'GET',
'parameters' => [
'parent' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'pageSize' => [
'location' => 'query',
'type' => 'integer',
],
'pageToken' => [
'location' => 'query',
'type' => 'string',
],
],
],'patch' => [
'path' => 'v1/{+name}',
'httpMethod' => 'PATCH',
'parameters' => [
'name' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'allowMissing' => [
'location' => 'query',
'type' => 'boolean',
],
],
],
]
]
);
}
}

Expand Down
25 changes: 25 additions & 0 deletions src/FirebaseCloudMessaging/FcmEmpty.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/*
* Copyright 2014 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.
*/

namespace Google\Service\FirebaseCloudMessaging;

class FcmEmpty extends \Google\Model
{
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FcmEmpty::class, 'Google_Service_FirebaseCloudMessaging_FcmEmpty');
69 changes: 69 additions & 0 deletions src/FirebaseCloudMessaging/ListTopicSubscriptionsResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/*
* Copyright 2014 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.
*/

namespace Google\Service\FirebaseCloudMessaging;

class ListTopicSubscriptionsResponse extends \Google\Collection
{
protected $collection_key = 'topicSubscriptions';
/**
* A token, which can be sent as `page_token` to retrieve the next page. If
* this field is omitted, there are no subsequent pages.
*
* @var string
*/
public $nextPageToken;
protected $topicSubscriptionsType = TopicSubscription::class;
protected $topicSubscriptionsDataType = 'array';

/**
* A token, which can be sent as `page_token` to retrieve the next page. If
* this field is omitted, there are no subsequent pages.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* The topic subscriptions for the instance.
*
* @param TopicSubscription[] $topicSubscriptions
*/
public function setTopicSubscriptions($topicSubscriptions)
{
$this->topicSubscriptions = $topicSubscriptions;
}
/**
* @return TopicSubscription[]
*/
public function getTopicSubscriptions()
{
return $this->topicSubscriptions;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListTopicSubscriptionsResponse::class, 'Google_Service_FirebaseCloudMessaging_ListTopicSubscriptionsResponse');
18 changes: 10 additions & 8 deletions src/FirebaseCloudMessaging/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class Message extends \Google\Model
protected $fcmOptionsType = FcmOptions::class;
protected $fcmOptionsDataType = '';
/**
* Firebase Installation ID to send a message to.
* [Firebase Installation ID (FID)](/docs/cloud-messaging/android/get-
* started#access-firebase-installation-id) to send a message to.
*
* @var string
*/
Expand All @@ -58,9 +59,9 @@ class Message extends \Google\Model
protected $notificationType = Notification::class;
protected $notificationDataType = '';
/**
* Deprecated: Use `fid` instead. Registration token to send a message to.
* During the transition period, this field also accepts a Firebase
* Installation ID (FID).
* Deprecated: Use `fid` instead. During the transition period, this field
* also accepts a Firebase Installation ID (FID). Registration token to send a
* message to.
*
* @deprecated
* @var string
Expand Down Expand Up @@ -165,7 +166,8 @@ public function getFcmOptions()
return $this->fcmOptions;
}
/**
* Firebase Installation ID to send a message to.
* [Firebase Installation ID (FID)](/docs/cloud-messaging/android/get-
* started#access-firebase-installation-id) to send a message to.
*
* @param string $fid
*/
Expand Down Expand Up @@ -214,9 +216,9 @@ public function getNotification()
return $this->notification;
}
/**
* Deprecated: Use `fid` instead. Registration token to send a message to.
* During the transition period, this field also accepts a Firebase
* Installation ID (FID).
* Deprecated: Use `fid` instead. During the transition period, this field
* also accepts a Firebase Installation ID (FID). Registration token to send a
* message to.
*
* @deprecated
* @param string $token
Expand Down
5 changes: 3 additions & 2 deletions src/FirebaseCloudMessaging/Resource/ProjectsMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
class ProjectsMessages extends \Google\Service\Resource
{
/**
* Send a message to specified target (a registration token, topic or
* condition). (messages.send)
* Send a message to specified target (a [Firebase Installation ID
* (FID)](/docs/cloud-messaging/android/get-started#access-firebase-
* installation-id), registration token, topic, or condition). (messages.send)
*
* @param string $parent Required. It contains the Firebase project id (i.e. the
* unique identifier for your Firebase project), in the format of
Expand Down
33 changes: 33 additions & 0 deletions src/FirebaseCloudMessaging/Resource/ProjectsRegistrations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/*
* Copyright 2014 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.
*/

namespace Google\Service\FirebaseCloudMessaging\Resource;

/**
* The "registrations" collection of methods.
* Typical usage is:
* <code>
* $fcmService = new Google\Service\FirebaseCloudMessaging(...);
* $registrations = $fcmService->projects_registrations;
* </code>
*/
class ProjectsRegistrations extends \Google\Service\Resource
{
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsRegistrations::class, 'Google_Service_FirebaseCloudMessaging_Resource_ProjectsRegistrations');
Loading
Loading