Initial commit: Complete WooCommerce Smart Google Pricing plugin with vendor dependencies

This commit is contained in:
2025-12-23 07:48:45 +01:00
commit 9b66109ca1
32472 changed files with 4065017 additions and 0 deletions

View File

@@ -0,0 +1,179 @@
<?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\FirebaseRealtimeDatabase;
class DatabaseInstance extends \Google\Model
{
/**
* Unspecified state, likely the result of an error on the backend. This is
* only used for distinguishing unset values.
*/
public const STATE_LIFECYCLE_STATE_UNSPECIFIED = 'LIFECYCLE_STATE_UNSPECIFIED';
/**
* The normal and active state.
*/
public const STATE_ACTIVE = 'ACTIVE';
/**
* The database is in a disabled state. It can be re-enabled later.
*/
public const STATE_DISABLED = 'DISABLED';
/**
* The database is in a deleted state.
*/
public const STATE_DELETED = 'DELETED';
/**
* Unknown state, likely the result of an error on the backend. This is only
* used for distinguishing unset values.
*/
public const TYPE_DATABASE_INSTANCE_TYPE_UNSPECIFIED = 'DATABASE_INSTANCE_TYPE_UNSPECIFIED';
/**
* The default database that is provisioned when a project is created.
*/
public const TYPE_DEFAULT_DATABASE = 'DEFAULT_DATABASE';
/**
* A database that the user created.
*/
public const TYPE_USER_DATABASE = 'USER_DATABASE';
/**
* Output only. Output Only. The globally unique hostname of the database.
*
* @var string
*/
public $databaseUrl;
/**
* The fully qualified resource name of the database instance, in the form:
* `projects/{project-number}/locations/{location-id}/instances/{database-
* id}`.
*
* @var string
*/
public $name;
/**
* Output only. The resource name of the project this instance belongs to. For
* example: `projects/{project-number}`.
*
* @var string
*/
public $project;
/**
* Output only. The database's lifecycle state. Read-only.
*
* @var string
*/
public $state;
/**
* Immutable. The database instance type. On creation only USER_DATABASE is
* allowed, which is also the default when omitted.
*
* @var string
*/
public $type;
/**
* Output only. Output Only. The globally unique hostname of the database.
*
* @param string $databaseUrl
*/
public function setDatabaseUrl($databaseUrl)
{
$this->databaseUrl = $databaseUrl;
}
/**
* @return string
*/
public function getDatabaseUrl()
{
return $this->databaseUrl;
}
/**
* The fully qualified resource name of the database instance, in the form:
* `projects/{project-number}/locations/{location-id}/instances/{database-
* id}`.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Output only. The resource name of the project this instance belongs to. For
* example: `projects/{project-number}`.
*
* @param string $project
*/
public function setProject($project)
{
$this->project = $project;
}
/**
* @return string
*/
public function getProject()
{
return $this->project;
}
/**
* Output only. The database's lifecycle state. Read-only.
*
* Accepted values: LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DISABLED, DELETED
*
* @param self::STATE_* $state
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return self::STATE_*
*/
public function getState()
{
return $this->state;
}
/**
* Immutable. The database instance type. On creation only USER_DATABASE is
* allowed, which is also the default when omitted.
*
* Accepted values: DATABASE_INSTANCE_TYPE_UNSPECIFIED, DEFAULT_DATABASE,
* USER_DATABASE
*
* @param self::TYPE_* $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return self::TYPE_*
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DatabaseInstance::class, 'Google_Service_FirebaseRealtimeDatabase_DatabaseInstance');

View File

@@ -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\FirebaseRealtimeDatabase;
class DisableDatabaseInstanceRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DisableDatabaseInstanceRequest::class, 'Google_Service_FirebaseRealtimeDatabase_DisableDatabaseInstanceRequest');

View File

@@ -0,0 +1,75 @@
<?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\FirebaseRealtimeDatabase;
class ListDatabaseInstancesResponse extends \Google\Collection
{
protected $collection_key = 'instances';
protected $instancesType = DatabaseInstance::class;
protected $instancesDataType = 'array';
/**
* If the result list is too large to fit in a single response, then a token
* is returned. If the string is empty, then this response is the last page of
* results. This token can be used in a subsequent call to
* `ListDatabaseInstances` to find the next group of database instances. Page
* tokens are short-lived and should not be persisted.
*
* @var string
*/
public $nextPageToken;
/**
* List of each DatabaseInstance that is in the parent Firebase project.
*
* @param DatabaseInstance[] $instances
*/
public function setInstances($instances)
{
$this->instances = $instances;
}
/**
* @return DatabaseInstance[]
*/
public function getInstances()
{
return $this->instances;
}
/**
* If the result list is too large to fit in a single response, then a token
* is returned. If the string is empty, then this response is the last page of
* results. This token can be used in a subsequent call to
* `ListDatabaseInstances` to find the next group of database instances. Page
* tokens are short-lived and should not be persisted.
*
* @param string $nextPageToken
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ListDatabaseInstancesResponse::class, 'Google_Service_FirebaseRealtimeDatabase_ListDatabaseInstancesResponse');

View File

@@ -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\FirebaseRealtimeDatabase;
class ReenableDatabaseInstanceRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReenableDatabaseInstanceRequest::class, 'Google_Service_FirebaseRealtimeDatabase_ReenableDatabaseInstanceRequest');

View File

@@ -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\FirebaseRealtimeDatabase\Resource;
/**
* The "projects" collection of methods.
* Typical usage is:
* <code>
* $firebasedatabaseService = new Google\Service\FirebaseRealtimeDatabase(...);
* $projects = $firebasedatabaseService->projects;
* </code>
*/
class Projects extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Projects::class, 'Google_Service_FirebaseRealtimeDatabase_Resource_Projects');

View File

@@ -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\FirebaseRealtimeDatabase\Resource;
/**
* The "locations" collection of methods.
* Typical usage is:
* <code>
* $firebasedatabaseService = new Google\Service\FirebaseRealtimeDatabase(...);
* $locations = $firebasedatabaseService->projects_locations;
* </code>
*/
class ProjectsLocations extends \Google\Service\Resource
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocations::class, 'Google_Service_FirebaseRealtimeDatabase_Resource_ProjectsLocations');

View File

@@ -0,0 +1,201 @@
<?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\FirebaseRealtimeDatabase\Resource;
use Google\Service\FirebaseRealtimeDatabase\DatabaseInstance;
use Google\Service\FirebaseRealtimeDatabase\DisableDatabaseInstanceRequest;
use Google\Service\FirebaseRealtimeDatabase\ListDatabaseInstancesResponse;
use Google\Service\FirebaseRealtimeDatabase\ReenableDatabaseInstanceRequest;
use Google\Service\FirebaseRealtimeDatabase\UndeleteDatabaseInstanceRequest;
/**
* The "instances" collection of methods.
* Typical usage is:
* <code>
* $firebasedatabaseService = new Google\Service\FirebaseRealtimeDatabase(...);
* $instances = $firebasedatabaseService->projects_locations_instances;
* </code>
*/
class ProjectsLocationsInstances extends \Google\Service\Resource
{
/**
* Requests that a new DatabaseInstance be created. The state of a successfully
* created DatabaseInstance is ACTIVE. Only available for projects on the Blaze
* plan. Projects can be upgraded using the Cloud Billing API https://cloud.goog
* le.com/billing/reference/rest/v1/projects/updateBillingInfo. Note that it
* might take a few minutes for billing enablement state to propagate to
* Firebase systems. (instances.create)
*
* @param string $parent Required. The parent project for which to create a
* database instance, in the form: `projects/{project-
* number}/locations/{location-id}`.
* @param DatabaseInstance $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string databaseId The globally unique identifier of the database
* instance.
* @opt_param bool validateOnly When set to true, the request will be validated
* but not submitted.
* @return DatabaseInstance
* @throws \Google\Service\Exception
*/
public function create($parent, DatabaseInstance $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('create', [$params], DatabaseInstance::class);
}
/**
* Marks a DatabaseInstance to be deleted. The DatabaseInstance will be set to
* the DELETED state for 20 days, and will be purged within 30 days. The default
* database cannot be deleted. IDs for deleted database instances may never be
* recovered or re-used. The Database may only be deleted if it is already in a
* DISABLED state. (instances.delete)
*
* @param string $name Required. The fully qualified resource name of the
* database instance, in the form: `projects/{project-
* number}/locations/{location-id}/instances/{database-id}`
* @param array $optParams Optional parameters.
* @return DatabaseInstance
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('delete', [$params], DatabaseInstance::class);
}
/**
* Disables a DatabaseInstance. The database can be re-enabled later using
* ReenableDatabaseInstance. When a database is disabled, all reads and writes
* are denied, including view access in the Firebase console.
* (instances.disable)
*
* @param string $name Required. The fully qualified resource name of the
* database instance, in the form: `projects/{project-
* number}/locations/{location-id}/instances/{database-id}`
* @param DisableDatabaseInstanceRequest $postBody
* @param array $optParams Optional parameters.
* @return DatabaseInstance
* @throws \Google\Service\Exception
*/
public function disable($name, DisableDatabaseInstanceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('disable', [$params], DatabaseInstance::class);
}
/**
* Gets the DatabaseInstance identified by the specified resource name.
* (instances.get)
*
* @param string $name Required. The fully qualified resource name of the
* database instance, in the form: `projects/{project-
* number}/locations/{location-id}/instances/{database-id}`. `database-id` is a
* globally unique identifier across all parent collections. For convenience,
* this method allows you to supply `-` as a wildcard character in place of
* specific collections under `projects` and `locations`. The resulting
* wildcarding form of the method is:
* `projects/-/locations/-/instances/{database-id}`.
* @param array $optParams Optional parameters.
* @return DatabaseInstance
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = array_merge($params, $optParams);
return $this->call('get', [$params], DatabaseInstance::class);
}
/**
* Lists each DatabaseInstance associated with the specified parent project. The
* list items are returned in no particular order, but will be a consistent view
* of the database instances when additional requests are made with a
* `pageToken`. The resulting list contains instances in any STATE. The list
* results may be stale by a few seconds. Use GetDatabaseInstance for consistent
* reads. (instances.listProjectsLocationsInstances)
*
* @param string $parent Required. The parent project for which to list database
* instances, in the form: `projects/{project-number}/locations/{location-id}`
* To list across all locations, use a parent in the form: `projects/{project-
* number}/locations/-`
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of database instances to return in
* the response. The server may return fewer than this at its discretion. If no
* value is specified (or too large a value is specified), then the server will
* impose its own limit.
* @opt_param string pageToken Token returned from a previous call to
* `ListDatabaseInstances` indicating where in the set of database instances to
* resume listing.
* @opt_param bool showDeleted Indicate that DatabaseInstances in the `DELETED`
* state should also be returned.
* @return ListDatabaseInstancesResponse
* @throws \Google\Service\Exception
*/
public function listProjectsLocationsInstances($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], ListDatabaseInstancesResponse::class);
}
/**
* Enables a DatabaseInstance. The database must have been disabled previously
* using DisableDatabaseInstance. The state of a successfully reenabled
* DatabaseInstance is ACTIVE. (instances.reenable)
*
* @param string $name Required. The fully qualified resource name of the
* database instance, in the form: `projects/{project-
* number}/locations/{location-id}/instances/{database-id}`
* @param ReenableDatabaseInstanceRequest $postBody
* @param array $optParams Optional parameters.
* @return DatabaseInstance
* @throws \Google\Service\Exception
*/
public function reenable($name, ReenableDatabaseInstanceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('reenable', [$params], DatabaseInstance::class);
}
/**
* Restores a DatabaseInstance that was previously marked to be deleted. After
* the delete method is used, DatabaseInstances are set to the DELETED state for
* 20 days, and will be purged within 30 days. Databases in the DELETED state
* can be undeleted without losing any data. This method may only be used on a
* DatabaseInstance in the DELETED state. Purged DatabaseInstances may not be
* recovered. (instances.undelete)
*
* @param string $name Required. The fully qualified resource name of the
* database instance, in the form: `projects/{project-
* number}/locations/{location-id}/instances/{database-id}`
* @param UndeleteDatabaseInstanceRequest $postBody
* @param array $optParams Optional parameters.
* @return DatabaseInstance
* @throws \Google\Service\Exception
*/
public function undelete($name, UndeleteDatabaseInstanceRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('undelete', [$params], DatabaseInstance::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProjectsLocationsInstances::class, 'Google_Service_FirebaseRealtimeDatabase_Resource_ProjectsLocationsInstances');

View File

@@ -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\FirebaseRealtimeDatabase;
class UndeleteDatabaseInstanceRequest extends \Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(UndeleteDatabaseInstanceRequest::class, 'Google_Service_FirebaseRealtimeDatabase_UndeleteDatabaseInstanceRequest');