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
127 changes: 127 additions & 0 deletions src/FirebaseDataConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class FirebaseDataConnect extends \Google\Service
public $projects_locations_operations;
public $projects_locations_services;
public $projects_locations_services_connectors;
public $projects_locations_services_postgrest;
public $projects_locations_services_postgrest_rpc;
public $projects_locations_services_schemas;
public $rootUrlTemplate;

Expand Down Expand Up @@ -516,6 +518,131 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
]
]
);
$this->projects_locations_services_postgrest = new FirebaseDataConnect\Resource\ProjectsLocationsServicesPostgrest(
$this,
$this->serviceName,
'postgrest',
[
'methods' => [
'postgrestDelete' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/{+firebasedataconnectTable}',
'httpMethod' => 'DELETE',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectTable' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'postgrestInsert' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/{+firebasedataconnectTable}',
'httpMethod' => 'POST',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectTable' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'postgrestSelect' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/{+firebasedataconnectTable}',
'httpMethod' => 'GET',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectTable' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'postgrestUpdate' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/{+firebasedataconnectTable}',
'httpMethod' => 'PATCH',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectTable' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'postgrestUpsert' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/{+firebasedataconnectTable}',
'httpMethod' => 'PUT',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectTable' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],
]
]
);
$this->projects_locations_services_postgrest_rpc = new FirebaseDataConnect\Resource\ProjectsLocationsServicesPostgrestRpc(
$this,
$this->serviceName,
'rpc',
[
'methods' => [
'postgrestCallFunction' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/rpc/{+firebasedataconnectFunction}',
'httpMethod' => 'POST',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectFunction' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'postgrestQueryFunction' => [
'path' => 'v1/{+firebasedataconnectService}/postgrest/rpc/{+firebasedataconnectFunction}',
'httpMethod' => 'GET',
'parameters' => [
'firebasedataconnectService' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'firebasedataconnectFunction' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],
]
]
);
$this->projects_locations_services_schemas = new FirebaseDataConnect\Resource\ProjectsLocationsServicesSchemas(
$this,
$this->serviceName,
Expand Down
95 changes: 95 additions & 0 deletions src/FirebaseDataConnect/HttpBody.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?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\FirebaseDataConnect;

class HttpBody extends \Google\Collection
{
protected $collection_key = 'extensions';
/**
* The HTTP Content-Type header value specifying the content type of the body.
*
* @var string
*/
public $contentType;
/**
* The HTTP request/response body as raw binary.
*
* @var string
*/
public $data;
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* @var array[]
*/
public $extensions;

/**
* The HTTP Content-Type header value specifying the content type of the body.
*
* @param string $contentType
*/
public function setContentType($contentType)
{
$this->contentType = $contentType;
}
/**
* @return string
*/
public function getContentType()
{
return $this->contentType;
}
/**
* The HTTP request/response body as raw binary.
*
* @param string $data
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* Application specific response metadata. Must be set in the first response
* for streaming APIs.
*
* @param array[] $extensions
*/
public function setExtensions($extensions)
{
$this->extensions = $extensions;
}
/**
* @return array[]
*/
public function getExtensions()
{
return $this->extensions;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(HttpBody::class, 'Google_Service_FirebaseDataConnect_HttpBody');
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<?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\FirebaseDataConnect\Resource;

use Google\Service\FirebaseDataConnect\HttpBody;

/**
* The "postgrest" collection of methods.
* Typical usage is:
* <code>
* $firebasedataconnectService = new Google\Service\FirebaseDataConnect(...);
* $postgrest = $firebasedataconnectService->projects_locations_services_postgrest;
* </code>
*/
class ProjectsLocationsServicesPostgrest extends \Google\Service\Resource
{
/**
* Executes a dynamic DELETE mutation on rows matching the URL filters.
* (postgrest.postgrestDelete)
*
* @param string $firebasedataconnectService Required. The resource name of the
* service, in the format:
* `projects/{project}/locations/{location}/services/{service}`
* @param string $firebasedataconnectTable Required. The name of the table to
* delete from.
* @param array $optParams Optional parameters.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function postgrestDelete($firebasedataconnectService, $firebasedataconnectTable, $optParams = [])
{
$params = ['firebasedataconnectService' => $firebasedataconnectService, 'firebasedataconnectTable' => $firebasedataconnectTable];
$params = array_merge($params, $optParams);
return $this->call('postgrestDelete', [$params], HttpBody::class);
}
/**
* Executes a dynamic INSERT (create) or UPSERT mutation on a target table.
* (postgrest.postgrestInsert)
*
* @param string $firebasedataconnectService Required. The resource name of the
* service, in the format:
* `projects/{project}/locations/{location}/services/{service}`
* @param string $firebasedataconnectTable Required. The name of the table to
* insert into.
* @param HttpBody $postBody
* @param array $optParams Optional parameters.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function postgrestInsert($firebasedataconnectService, $firebasedataconnectTable, HttpBody $postBody, $optParams = [])
{
$params = ['firebasedataconnectService' => $firebasedataconnectService, 'firebasedataconnectTable' => $firebasedataconnectTable, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('postgrestInsert', [$params], HttpBody::class);
}
/**
* Executes a dynamic SELECT (read) query on a target PostgreSQL table.
* Projections, filters, sorting, and embeddings are mapped from the HTTP URL
* query parameters. (postgrest.postgrestSelect)
*
* @param string $firebasedataconnectService Required. The resource name of the
* service, in the format:
* `projects/{project}/locations/{location}/services/{service}`
* @param string $firebasedataconnectTable Required. The name of the table to
* select from.
* @param array $optParams Optional parameters.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function postgrestSelect($firebasedataconnectService, $firebasedataconnectTable, $optParams = [])
{
$params = ['firebasedataconnectService' => $firebasedataconnectService, 'firebasedataconnectTable' => $firebasedataconnectTable];
$params = array_merge($params, $optParams);
return $this->call('postgrestSelect', [$params], HttpBody::class);
}
/**
* Executes a dynamic UPDATE (modify) mutation on rows matching the URL filters.
* (postgrest.postgrestUpdate)
*
* @param string $firebasedataconnectService Required. The resource name of the
* service, in the format:
* `projects/{project}/locations/{location}/services/{service}`
* @param string $firebasedataconnectTable Required. The name of the table to
* update.
* @param HttpBody $postBody
* @param array $optParams Optional parameters.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function postgrestUpdate($firebasedataconnectService, $firebasedataconnectTable, HttpBody $postBody, $optParams = [])
{
$params = ['firebasedataconnectService' => $firebasedataconnectService, 'firebasedataconnectTable' => $firebasedataconnectTable, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('postgrestUpdate', [$params], HttpBody::class);
}
/**
* Executes a dynamic UPSERT (replace or create) mutation on a target table
* identified by primary key filters. (postgrest.postgrestUpsert)
*
* @param string $firebasedataconnectService Required. The resource name of the
* service, in the format:
* `projects/{project}/locations/{location}/services/{service}`
* @param string $firebasedataconnectTable Required. The name of the table to
* upsert into.
* @param HttpBody $postBody
* @param array $optParams Optional parameters.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function postgrestUpsert($firebasedataconnectService, $firebasedataconnectTable, HttpBody $postBody, $optParams = [])
{
$params = ['firebasedataconnectService' => $firebasedataconnectService, 'firebasedataconnectTable' => $firebasedataconnectTable, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('postgrestUpsert', [$params], HttpBody::class);
}
}

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