diff --git a/SqlAdmin/metadata/V1/CloudSqlInstances.php b/SqlAdmin/metadata/V1/CloudSqlInstances.php
index cd33ba979b7..a4d17c35d2d 100644
Binary files a/SqlAdmin/metadata/V1/CloudSqlInstances.php and b/SqlAdmin/metadata/V1/CloudSqlInstances.php differ
diff --git a/SqlAdmin/metadata/V1/CloudSqlResources.php b/SqlAdmin/metadata/V1/CloudSqlResources.php
index 4e6006f6315..fd0a2267dd4 100644
Binary files a/SqlAdmin/metadata/V1/CloudSqlResources.php and b/SqlAdmin/metadata/V1/CloudSqlResources.php differ
diff --git a/SqlAdmin/metadata/V1Beta4/CloudSql.php b/SqlAdmin/metadata/V1Beta4/CloudSql.php
index 1454c8bf840..d3ee36266ae 100644
Binary files a/SqlAdmin/metadata/V1Beta4/CloudSql.php and b/SqlAdmin/metadata/V1Beta4/CloudSql.php differ
diff --git a/SqlAdmin/metadata/V1Beta4/CloudSqlResources.php b/SqlAdmin/metadata/V1Beta4/CloudSqlResources.php
index 867f91c7e6b..bac030aa61a 100644
Binary files a/SqlAdmin/metadata/V1Beta4/CloudSqlResources.php and b/SqlAdmin/metadata/V1Beta4/CloudSqlResources.php differ
diff --git a/SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php b/SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php
new file mode 100644
index 00000000000..eb1711a8938
--- /dev/null
+++ b/SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php
@@ -0,0 +1,80 @@
+setInstance($instance)
+ ->setProject($project)
+ ->setBody($body);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var SqlInstancesAcquireSsrsLeaseResponse $response */
+ $response = $sqlInstancesServiceClient->acquireSsrsLease($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $instance = '[INSTANCE]';
+ $project = '[PROJECT]';
+
+ acquire_ssrs_lease_sample($instance, $project);
+}
+// [END sqladmin_v1_generated_SqlInstancesService_AcquireSsrsLease_sync]
diff --git a/SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php b/SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php
new file mode 100644
index 00000000000..9795d90041e
--- /dev/null
+++ b/SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php
@@ -0,0 +1,76 @@
+setInstance($instance)
+ ->setProject($project);
+
+ // Call the API and handle any network failures.
+ try {
+ /** @var SqlInstancesReleaseSsrsLeaseResponse $response */
+ $response = $sqlInstancesServiceClient->releaseSsrsLease($request);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $instance = '[INSTANCE]';
+ $project = '[PROJECT]';
+
+ release_ssrs_lease_sample($instance, $project);
+}
+// [END sqladmin_v1_generated_SqlInstancesService_ReleaseSsrsLease_sync]
diff --git a/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php
new file mode 100644
index 00000000000..e64643a2bbd
--- /dev/null
+++ b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php
@@ -0,0 +1,71 @@
+acquireSsrsLease($instance, $project);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $instance = '[INSTANCE]';
+ $project = '[PROJECT]';
+
+ acquire_ssrs_lease_sample($instance, $project);
+}
+// [END sqladmin_v1beta4_generated_SqlInstancesService_AcquireSsrsLease_sync]
diff --git a/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php
new file mode 100644
index 00000000000..6b4fcf66f3c
--- /dev/null
+++ b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php
@@ -0,0 +1,71 @@
+releaseSsrsLease($instance, $project);
+ printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
+ } catch (ApiException $ex) {
+ printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
+ }
+}
+
+/**
+ * Helper to execute the sample.
+ *
+ * This sample has been automatically generated and should be regarded as a code
+ * template only. It will require modifications to work:
+ * - It may require correct/in-range values for request initialization.
+ * - It may require specifying regional endpoints when creating the service client,
+ * please see the apiEndpoint client configuration option for more details.
+ */
+function callSample(): void
+{
+ $instance = '[INSTANCE]';
+ $project = '[PROJECT]';
+
+ release_ssrs_lease_sample($instance, $project);
+}
+// [END sqladmin_v1beta4_generated_SqlInstancesService_ReleaseSsrsLease_sync]
diff --git a/SqlAdmin/src/V1/AcquireSsrsLeaseContext.php b/SqlAdmin/src/V1/AcquireSsrsLeaseContext.php
new file mode 100644
index 00000000000..9838cf0fc43
--- /dev/null
+++ b/SqlAdmin/src/V1/AcquireSsrsLeaseContext.php
@@ -0,0 +1,217 @@
+google.cloud.sql.v1.AcquireSsrsLeaseContext
+ */
+class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ *
+ * Generated from protobuf field optional string setup_login = 1;
+ */
+ private $setup_login = null;
+ /**
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ *
+ * Generated from protobuf field optional string service_login = 2;
+ */
+ private $service_login = null;
+ /**
+ * The report database to be used for SSRS setup.
+ *
+ * Generated from protobuf field optional string report_database = 3;
+ */
+ private $report_database = null;
+ /**
+ * Lease duration needed for SSRS setup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration duration = 4;
+ */
+ private $duration = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $setup_login
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ * @type string $service_login
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ * @type string $report_database
+ * The report database to be used for SSRS setup.
+ * @type \Google\Protobuf\Duration $duration
+ * Lease duration needed for SSRS setup.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ *
+ * Generated from protobuf field optional string setup_login = 1;
+ * @return string
+ */
+ public function getSetupLogin()
+ {
+ return isset($this->setup_login) ? $this->setup_login : '';
+ }
+
+ public function hasSetupLogin()
+ {
+ return isset($this->setup_login);
+ }
+
+ public function clearSetupLogin()
+ {
+ unset($this->setup_login);
+ }
+
+ /**
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ *
+ * Generated from protobuf field optional string setup_login = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSetupLogin($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->setup_login = $var;
+
+ return $this;
+ }
+
+ /**
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ *
+ * Generated from protobuf field optional string service_login = 2;
+ * @return string
+ */
+ public function getServiceLogin()
+ {
+ return isset($this->service_login) ? $this->service_login : '';
+ }
+
+ public function hasServiceLogin()
+ {
+ return isset($this->service_login);
+ }
+
+ public function clearServiceLogin()
+ {
+ unset($this->service_login);
+ }
+
+ /**
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ *
+ * Generated from protobuf field optional string service_login = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceLogin($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_login = $var;
+
+ return $this;
+ }
+
+ /**
+ * The report database to be used for SSRS setup.
+ *
+ * Generated from protobuf field optional string report_database = 3;
+ * @return string
+ */
+ public function getReportDatabase()
+ {
+ return isset($this->report_database) ? $this->report_database : '';
+ }
+
+ public function hasReportDatabase()
+ {
+ return isset($this->report_database);
+ }
+
+ public function clearReportDatabase()
+ {
+ unset($this->report_database);
+ }
+
+ /**
+ * The report database to be used for SSRS setup.
+ *
+ * Generated from protobuf field optional string report_database = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setReportDatabase($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->report_database = $var;
+
+ return $this;
+ }
+
+ /**
+ * Lease duration needed for SSRS setup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration duration = 4;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getDuration()
+ {
+ return $this->duration;
+ }
+
+ public function hasDuration()
+ {
+ return isset($this->duration);
+ }
+
+ public function clearDuration()
+ {
+ unset($this->duration);
+ }
+
+ /**
+ * Lease duration needed for SSRS setup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration duration = 4;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setDuration($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->duration = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/BackupConfiguration.php b/SqlAdmin/src/V1/BackupConfiguration.php
index fe0013ef8eb..14d47f2f57b 100644
--- a/SqlAdmin/src/V1/BackupConfiguration.php
+++ b/SqlAdmin/src/V1/BackupConfiguration.php
@@ -72,6 +72,13 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9;
*/
private $transaction_log_retention_days = null;
+ /**
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $transactional_log_storage_state = null;
/**
* Constructor.
@@ -100,6 +107,9 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message
* @type \Google\Protobuf\Int32Value $transaction_log_retention_days
* The number of days of transaction logs we retain for point in time
* restore, from 1-7.
+ * @type int $transactional_log_storage_state
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
* }
*/
public function __construct($data = NULL) {
@@ -546,5 +556,43 @@ public function setTransactionLogRetentionDaysValue($var)
$this->writeWrapperValue("transaction_log_retention_days", $var);
return $this;}
+ /**
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getTransactionalLogStorageState()
+ {
+ return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0;
+ }
+
+ public function hasTransactionalLogStorageState()
+ {
+ return isset($this->transactional_log_storage_state);
+ }
+
+ public function clearTransactionalLogStorageState()
+ {
+ unset($this->transactional_log_storage_state);
+ }
+
+ /**
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setTransactionalLogStorageState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupConfiguration\TransactionalLogStorageState::class);
+ $this->transactional_log_storage_state = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php b/SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php
new file mode 100644
index 00000000000..60e6472ee91
--- /dev/null
+++ b/SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php
@@ -0,0 +1,79 @@
+google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState
+ */
+class TransactionalLogStorageState
+{
+ /**
+ * Unspecified.
+ *
+ * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0;
+ */
+ const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0;
+ /**
+ * The transaction logs for the instance are stored on a data disk.
+ *
+ * Generated from protobuf enum DISK = 1;
+ */
+ const DISK = 1;
+ /**
+ * The transaction logs for the instance are switching from being stored on
+ * a data disk to being stored in Cloud Storage.
+ *
+ * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2;
+ */
+ const SWITCHING_TO_CLOUD_STORAGE = 2;
+ /**
+ * The transaction logs for the instance are now stored in Cloud Storage.
+ * Previously, they were stored on a data disk.
+ *
+ * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3;
+ */
+ const SWITCHED_TO_CLOUD_STORAGE = 3;
+ /**
+ * The transaction logs for the instance are stored in Cloud Storage.
+ *
+ * Generated from protobuf enum CLOUD_STORAGE = 4;
+ */
+ const CLOUD_STORAGE = 4;
+
+ private static $valueToName = [
+ self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED',
+ self::DISK => 'DISK',
+ self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE',
+ self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE',
+ self::CLOUD_STORAGE => 'CLOUD_STORAGE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php b/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php
index 1a4e696cdb2..1b79b87cdfc 100644
--- a/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php
+++ b/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php
@@ -35,6 +35,8 @@
use Google\Cloud\Sql\V1\InstancesListResponse;
use Google\Cloud\Sql\V1\InstancesListServerCasResponse;
use Google\Cloud\Sql\V1\Operation;
+use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseRequest;
+use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse;
use Google\Cloud\Sql\V1\SqlInstancesAddServerCaRequest;
use Google\Cloud\Sql\V1\SqlInstancesCloneRequest;
use Google\Cloud\Sql\V1\SqlInstancesCreateEphemeralCertRequest;
@@ -56,6 +58,8 @@
use Google\Cloud\Sql\V1\SqlInstancesPerformDiskShrinkRequest;
use Google\Cloud\Sql\V1\SqlInstancesPromoteReplicaRequest;
use Google\Cloud\Sql\V1\SqlInstancesReencryptRequest;
+use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseRequest;
+use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse;
use Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequest;
use Google\Cloud\Sql\V1\SqlInstancesResetReplicaSizeRequest;
use Google\Cloud\Sql\V1\SqlInstancesResetSslConfigRequest;
@@ -79,6 +83,7 @@
* This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods.
*
+ * @method PromiseInterface acquireSsrsLeaseAsync(SqlInstancesAcquireSsrsLeaseRequest $request, array $optionalArgs = [])
* @method PromiseInterface addServerCaAsync(SqlInstancesAddServerCaRequest $request, array $optionalArgs = [])
* @method PromiseInterface cloneAsync(SqlInstancesCloneRequest $request, array $optionalArgs = [])
* @method PromiseInterface createEphemeralAsync(SqlInstancesCreateEphemeralCertRequest $request, array $optionalArgs = [])
@@ -98,6 +103,7 @@
* @method PromiseInterface performDiskShrinkAsync(SqlInstancesPerformDiskShrinkRequest $request, array $optionalArgs = [])
* @method PromiseInterface promoteReplicaAsync(SqlInstancesPromoteReplicaRequest $request, array $optionalArgs = [])
* @method PromiseInterface reencryptAsync(SqlInstancesReencryptRequest $request, array $optionalArgs = [])
+ * @method PromiseInterface releaseSsrsLeaseAsync(SqlInstancesReleaseSsrsLeaseRequest $request, array $optionalArgs = [])
* @method PromiseInterface rescheduleMaintenanceAsync(SqlInstancesRescheduleMaintenanceRequest $request, array $optionalArgs = [])
* @method PromiseInterface resetReplicaSizeAsync(SqlInstancesResetReplicaSizeRequest $request, array $optionalArgs = [])
* @method PromiseInterface resetSslConfigAsync(SqlInstancesResetSslConfigRequest $request, array $optionalArgs = [])
@@ -231,6 +237,32 @@ public function __call($method, $args)
return call_user_func_array([$this, 'startAsyncCall'], $args);
}
+ /**
+ * Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * The async variant is {@see SqlInstancesServiceClient::acquireSsrsLeaseAsync()} .
+ *
+ * @example samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php
+ *
+ * @param SqlInstancesAcquireSsrsLeaseRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return SqlInstancesAcquireSsrsLeaseResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function acquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesAcquireSsrsLeaseResponse
+ {
+ return $this->startApiCall('AcquireSsrsLease', $request, $callOptions)->wait();
+ }
+
/**
* Adds a new trusted Certificate Authority (CA) version for the specified
* instance. Required to prepare for a certificate rotation. If a CA version
@@ -753,6 +785,32 @@ public function reencrypt(SqlInstancesReencryptRequest $request, array $callOpti
return $this->startApiCall('Reencrypt', $request, $callOptions)->wait();
}
+ /**
+ * Release a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * The async variant is {@see SqlInstancesServiceClient::releaseSsrsLeaseAsync()} .
+ *
+ * @example samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php
+ *
+ * @param SqlInstancesReleaseSsrsLeaseRequest $request A request to house fields associated with the call.
+ * @param array $callOptions {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return SqlInstancesReleaseSsrsLeaseResponse
+ *
+ * @throws ApiException Thrown if the API call fails.
+ */
+ public function releaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesReleaseSsrsLeaseResponse
+ {
+ return $this->startApiCall('ReleaseSsrsLease', $request, $callOptions)->wait();
+ }
+
/**
* Reschedules the maintenance on the given instance.
*
diff --git a/SqlAdmin/src/V1/DatabaseInstance.php b/SqlAdmin/src/V1/DatabaseInstance.php
index 24a20ebd6da..667241e2416 100644
--- a/SqlAdmin/src/V1/DatabaseInstance.php
+++ b/SqlAdmin/src/V1/DatabaseInstance.php
@@ -300,6 +300,20 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message
* Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $write_endpoint = null;
+ /**
+ * Optional. The pair of a primary instance and disaster recovery (DR)
+ * replica. A DR replica is a cross-region replica that you designate for
+ * failover in the event that the primary instance has regional failure.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $replication_cluster = null;
+ /**
+ * Gemini configuration.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55;
+ */
+ private $gemini_config = null;
/**
* Constructor.
@@ -425,6 +439,12 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message
* Output only. DEPRECATED: please use write_endpoint instead.
* @type string $write_endpoint
* Output only. The dns name of the primary instance in a replication group.
+ * @type \Google\Cloud\Sql\V1\ReplicationCluster $replication_cluster
+ * Optional. The pair of a primary instance and disaster recovery (DR)
+ * replica. A DR replica is a cross-region replica that you designate for
+ * failover in the event that the primary instance has regional failure.
+ * @type \Google\Cloud\Sql\V1\GeminiInstanceConfig $gemini_config
+ * Gemini configuration.
* }
*/
public function __construct($data = NULL) {
@@ -1865,5 +1885,81 @@ public function setWriteEndpoint($var)
return $this;
}
+ /**
+ * Optional. The pair of a primary instance and disaster recovery (DR)
+ * replica. A DR replica is a cross-region replica that you designate for
+ * failover in the event that the primary instance has regional failure.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Sql\V1\ReplicationCluster|null
+ */
+ public function getReplicationCluster()
+ {
+ return $this->replication_cluster;
+ }
+
+ public function hasReplicationCluster()
+ {
+ return isset($this->replication_cluster);
+ }
+
+ public function clearReplicationCluster()
+ {
+ unset($this->replication_cluster);
+ }
+
+ /**
+ * Optional. The pair of a primary instance and disaster recovery (DR)
+ * replica. A DR replica is a cross-region replica that you designate for
+ * failover in the event that the primary instance has regional failure.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Sql\V1\ReplicationCluster $var
+ * @return $this
+ */
+ public function setReplicationCluster($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicationCluster::class);
+ $this->replication_cluster = $var;
+
+ return $this;
+ }
+
+ /**
+ * Gemini configuration.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55;
+ * @return \Google\Cloud\Sql\V1\GeminiInstanceConfig|null
+ */
+ public function getGeminiConfig()
+ {
+ return $this->gemini_config;
+ }
+
+ public function hasGeminiConfig()
+ {
+ return isset($this->gemini_config);
+ }
+
+ public function clearGeminiConfig()
+ {
+ unset($this->gemini_config);
+ }
+
+ /**
+ * Gemini configuration.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55;
+ * @param \Google\Cloud\Sql\V1\GeminiInstanceConfig $var
+ * @return $this
+ */
+ public function setGeminiConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\GeminiInstanceConfig::class);
+ $this->gemini_config = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1/GeminiInstanceConfig.php b/SqlAdmin/src/V1/GeminiInstanceConfig.php
new file mode 100644
index 00000000000..7965703349e
--- /dev/null
+++ b/SqlAdmin/src/V1/GeminiInstanceConfig.php
@@ -0,0 +1,297 @@
+google.cloud.sql.v1.GeminiInstanceConfig
+ */
+class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Whether gemini is enabled.
+ *
+ * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $entitled = null;
+ /**
+ * Output only. Whether vacuum management is enabled.
+ *
+ * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $google_vacuum_mgmt_enabled = null;
+ /**
+ * Output only. Whether oom session cancel is enabled.
+ *
+ * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $oom_session_cancel_enabled = null;
+ /**
+ * Output only. Whether active query is enabled.
+ *
+ * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $active_query_enabled = null;
+ /**
+ * Output only. Whether index advisor is enabled.
+ *
+ * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $index_advisor_enabled = null;
+ /**
+ * Output only. Whether flag recommender is enabled.
+ *
+ * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $flag_recommender_enabled = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $entitled
+ * Output only. Whether gemini is enabled.
+ * @type bool $google_vacuum_mgmt_enabled
+ * Output only. Whether vacuum management is enabled.
+ * @type bool $oom_session_cancel_enabled
+ * Output only. Whether oom session cancel is enabled.
+ * @type bool $active_query_enabled
+ * Output only. Whether active query is enabled.
+ * @type bool $index_advisor_enabled
+ * Output only. Whether index advisor is enabled.
+ * @type bool $flag_recommender_enabled
+ * Output only. Whether flag recommender is enabled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Whether gemini is enabled.
+ *
+ * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getEntitled()
+ {
+ return isset($this->entitled) ? $this->entitled : false;
+ }
+
+ public function hasEntitled()
+ {
+ return isset($this->entitled);
+ }
+
+ public function clearEntitled()
+ {
+ unset($this->entitled);
+ }
+
+ /**
+ * Output only. Whether gemini is enabled.
+ *
+ * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setEntitled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->entitled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether vacuum management is enabled.
+ *
+ * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getGoogleVacuumMgmtEnabled()
+ {
+ return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false;
+ }
+
+ public function hasGoogleVacuumMgmtEnabled()
+ {
+ return isset($this->google_vacuum_mgmt_enabled);
+ }
+
+ public function clearGoogleVacuumMgmtEnabled()
+ {
+ unset($this->google_vacuum_mgmt_enabled);
+ }
+
+ /**
+ * Output only. Whether vacuum management is enabled.
+ *
+ * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setGoogleVacuumMgmtEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->google_vacuum_mgmt_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether oom session cancel is enabled.
+ *
+ * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getOomSessionCancelEnabled()
+ {
+ return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false;
+ }
+
+ public function hasOomSessionCancelEnabled()
+ {
+ return isset($this->oom_session_cancel_enabled);
+ }
+
+ public function clearOomSessionCancelEnabled()
+ {
+ unset($this->oom_session_cancel_enabled);
+ }
+
+ /**
+ * Output only. Whether oom session cancel is enabled.
+ *
+ * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setOomSessionCancelEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->oom_session_cancel_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether active query is enabled.
+ *
+ * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getActiveQueryEnabled()
+ {
+ return isset($this->active_query_enabled) ? $this->active_query_enabled : false;
+ }
+
+ public function hasActiveQueryEnabled()
+ {
+ return isset($this->active_query_enabled);
+ }
+
+ public function clearActiveQueryEnabled()
+ {
+ unset($this->active_query_enabled);
+ }
+
+ /**
+ * Output only. Whether active query is enabled.
+ *
+ * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setActiveQueryEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->active_query_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether index advisor is enabled.
+ *
+ * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getIndexAdvisorEnabled()
+ {
+ return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false;
+ }
+
+ public function hasIndexAdvisorEnabled()
+ {
+ return isset($this->index_advisor_enabled);
+ }
+
+ public function clearIndexAdvisorEnabled()
+ {
+ unset($this->index_advisor_enabled);
+ }
+
+ /**
+ * Output only. Whether index advisor is enabled.
+ *
+ * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setIndexAdvisorEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->index_advisor_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether flag recommender is enabled.
+ *
+ * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getFlagRecommenderEnabled()
+ {
+ return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false;
+ }
+
+ public function hasFlagRecommenderEnabled()
+ {
+ return isset($this->flag_recommender_enabled);
+ }
+
+ public function clearFlagRecommenderEnabled()
+ {
+ unset($this->flag_recommender_enabled);
+ }
+
+ /**
+ * Output only. Whether flag recommender is enabled.
+ *
+ * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setFlagRecommenderEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->flag_recommender_enabled = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/ImportContext.php b/SqlAdmin/src/V1/ImportContext.php
index 72721ba71fc..a0a6bdf601d 100644
--- a/SqlAdmin/src/V1/ImportContext.php
+++ b/SqlAdmin/src/V1/ImportContext.php
@@ -64,6 +64,12 @@ class ImportContext extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7;
*/
private $bak_import_options = null;
+ /**
+ * Optional. Options for importing data from SQL statements.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $sql_import_options = null;
/**
* Constructor.
@@ -92,6 +98,8 @@ class ImportContext extends \Google\Protobuf\Internal\Message
* The PostgreSQL user for this import operation. PostgreSQL instances only.
* @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $bak_import_options
* Import parameters specific to SQL Server .BAK files
+ * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $sql_import_options
+ * Optional. Options for importing data from SQL statements.
* }
*/
public function __construct($data = NULL) {
@@ -315,5 +323,41 @@ public function setBakImportOptions($var)
return $this;
}
+ /**
+ * Optional. Options for importing data from SQL statements.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions|null
+ */
+ public function getSqlImportOptions()
+ {
+ return $this->sql_import_options;
+ }
+
+ public function hasSqlImportOptions()
+ {
+ return isset($this->sql_import_options);
+ }
+
+ public function clearSqlImportOptions()
+ {
+ unset($this->sql_import_options);
+ }
+
+ /**
+ * Optional. Options for importing data from SQL statements.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $var
+ * @return $this
+ */
+ public function setSqlImportOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions::class);
+ $this->sql_import_options = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1/ImportContext/SqlImportOptions.php b/SqlAdmin/src/V1/ImportContext/SqlImportOptions.php
new file mode 100644
index 00000000000..a1efd5fe7ba
--- /dev/null
+++ b/SqlAdmin/src/V1/ImportContext/SqlImportOptions.php
@@ -0,0 +1,174 @@
+google.cloud.sql.v1.ImportContext.SqlImportOptions
+ */
+class SqlImportOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $threads = null;
+ /**
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $parallel = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Int32Value $threads
+ * Optional. The number of threads to use for parallel import.
+ * @type \Google\Protobuf\BoolValue $parallel
+ * Optional. Whether or not the import should be parallel.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Int32Value|null
+ */
+ public function getThreads()
+ {
+ return $this->threads;
+ }
+
+ public function hasThreads()
+ {
+ return isset($this->threads);
+ }
+
+ public function clearThreads()
+ {
+ unset($this->threads);
+ }
+
+ /**
+ * Returns the unboxed value from getThreads()
+
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int|null
+ */
+ public function getThreadsValue()
+ {
+ return $this->readWrapperValue("threads");
+ }
+
+ /**
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Int32Value $var
+ * @return $this
+ */
+ public function setThreads($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
+ $this->threads = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
+
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int|null $var
+ * @return $this
+ */
+ public function setThreadsValue($var)
+ {
+ $this->writeWrapperValue("threads", $var);
+ return $this;}
+
+ /**
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\BoolValue|null
+ */
+ public function getParallel()
+ {
+ return $this->parallel;
+ }
+
+ public function hasParallel()
+ {
+ return isset($this->parallel);
+ }
+
+ public function clearParallel()
+ {
+ unset($this->parallel);
+ }
+
+ /**
+ * Returns the unboxed value from getParallel()
+
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool|null
+ */
+ public function getParallelValue()
+ {
+ return $this->readWrapperValue("parallel");
+ }
+
+ /**
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\BoolValue $var
+ * @return $this
+ */
+ public function setParallel($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
+ $this->parallel = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
+
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool|null $var
+ * @return $this
+ */
+ public function setParallelValue($var)
+ {
+ $this->writeWrapperValue("parallel", $var);
+ return $this;}
+
+}
+
+
diff --git a/SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php
new file mode 100644
index 00000000000..fce47a781af
--- /dev/null
+++ b/SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php
@@ -0,0 +1,77 @@
+google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest
+ */
+class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Contains details about the acquire SSRS lease operation.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
+ */
+ private $acquire_ssrs_lease_context = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context
+ * Contains details about the acquire SSRS lease operation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Contains details about the acquire SSRS lease operation.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
+ * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null
+ */
+ public function getAcquireSsrsLeaseContext()
+ {
+ return $this->acquire_ssrs_lease_context;
+ }
+
+ public function hasAcquireSsrsLeaseContext()
+ {
+ return isset($this->acquire_ssrs_lease_context);
+ }
+
+ public function clearAcquireSsrsLeaseContext()
+ {
+ unset($this->acquire_ssrs_lease_context);
+ }
+
+ /**
+ * Contains details about the acquire SSRS lease operation.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
+ * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var
+ * @return $this
+ */
+ public function setAcquireSsrsLeaseContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class);
+ $this->acquire_ssrs_lease_context = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/IpConfiguration.php b/SqlAdmin/src/V1/IpConfiguration.php
index b236a52ac70..3de6807f242 100644
--- a/SqlAdmin/src/V1/IpConfiguration.php
+++ b/SqlAdmin/src/V1/IpConfiguration.php
@@ -31,7 +31,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
*/
private $private_network = '';
/**
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -70,20 +70,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
*/
private $enable_private_path_for_google_cloud_services = null;
/**
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
*
* Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8;
*/
@@ -109,7 +111,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
* `/projects/myProject/global/networks/default`. This setting can
* be updated, but it cannot be removed after it is set.
* @type \Google\Protobuf\BoolValue $require_ssl
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -132,20 +134,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
* Controls connectivity to private IP instances from Google services,
* such as BigQuery.
* @type int $ssl_mode
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
* @type \Google\Cloud\Sql\V1\PscConfig $psc_config
* PSC settings for this instance.
* }
@@ -251,7 +255,7 @@ public function setPrivateNetwork($var)
}
/**
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -281,7 +285,7 @@ public function clearRequireSsl()
/**
* Returns the unboxed value from getRequireSsl()
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -299,7 +303,7 @@ public function getRequireSslValue()
}
/**
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -323,7 +327,7 @@ public function setRequireSsl($var)
/**
* Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -475,20 +479,22 @@ public function setEnablePrivatePathForGoogleCloudServicesValue($var)
return $this;}
/**
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
*
* Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8;
* @return int
@@ -499,20 +505,22 @@ public function getSslMode()
}
/**
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
*
* Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8;
* @param int $var
diff --git a/SqlAdmin/src/V1/Operation.php b/SqlAdmin/src/V1/Operation.php
index cfb27ddb76e..75d8ac25b4b 100644
--- a/SqlAdmin/src/V1/Operation.php
+++ b/SqlAdmin/src/V1/Operation.php
@@ -138,6 +138,12 @@ class Operation extends \Google\Protobuf\Internal\Message
* Generated from protobuf field string target_project = 15;
*/
private $target_project = '';
+ /**
+ * The context for acquire SSRS lease operation, if applicable.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20;
+ */
+ private $acquire_ssrs_lease_context = null;
/**
* Constructor.
@@ -199,6 +205,8 @@ class Operation extends \Google\Protobuf\Internal\Message
* The URI of this resource.
* @type string $target_project
* The project ID of the target instance related to this operation.
+ * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context
+ * The context for acquire SSRS lease operation, if applicable.
* }
*/
public function __construct($data = NULL) {
@@ -766,5 +774,41 @@ public function setTargetProject($var)
return $this;
}
+ /**
+ * The context for acquire SSRS lease operation, if applicable.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20;
+ * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null
+ */
+ public function getAcquireSsrsLeaseContext()
+ {
+ return $this->acquire_ssrs_lease_context;
+ }
+
+ public function hasAcquireSsrsLeaseContext()
+ {
+ return isset($this->acquire_ssrs_lease_context);
+ }
+
+ public function clearAcquireSsrsLeaseContext()
+ {
+ unset($this->acquire_ssrs_lease_context);
+ }
+
+ /**
+ * The context for acquire SSRS lease operation, if applicable.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20;
+ * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var
+ * @return $this
+ */
+ public function setAcquireSsrsLeaseContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class);
+ $this->acquire_ssrs_lease_context = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1/Operation/SqlOperationType.php b/SqlAdmin/src/V1/Operation/SqlOperationType.php
index f69079bcd62..c1a10393293 100644
--- a/SqlAdmin/src/V1/Operation/SqlOperationType.php
+++ b/SqlAdmin/src/V1/Operation/SqlOperationType.php
@@ -245,6 +245,27 @@ class SqlOperationType
* Generated from protobuf enum SWITCHOVER = 39;
*/
const SWITCHOVER = 39;
+ /**
+ * Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42;
+ */
+ const ACQUIRE_SSRS_LEASE = 42;
+ /**
+ * Release a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * Generated from protobuf enum RELEASE_SSRS_LEASE = 43;
+ */
+ const RELEASE_SSRS_LEASE = 43;
+ /**
+ * Reconfigures old primary after a promote replica operation. Effect of a
+ * promote operation to the old primary is executed in this operation,
+ * asynchronously from the promote replica operation executed to the
+ * replica.
+ *
+ * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44;
+ */
+ const RECONFIGURE_OLD_PRIMARY = 44;
private static $valueToName = [
self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED',
@@ -286,6 +307,9 @@ class SqlOperationType
self::AUTO_RESTART => 'AUTO_RESTART',
self::REENCRYPT => 'REENCRYPT',
self::SWITCHOVER => 'SWITCHOVER',
+ self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE',
+ self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE',
+ self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY',
];
public static function name($value)
diff --git a/SqlAdmin/src/V1/ReplicationCluster.php b/SqlAdmin/src/V1/ReplicationCluster.php
new file mode 100644
index 00000000000..d505dd43e6c
--- /dev/null
+++ b/SqlAdmin/src/V1/ReplicationCluster.php
@@ -0,0 +1,125 @@
+google.cloud.sql.v1.ReplicationCluster
+ */
+class ReplicationCluster extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ *
+ * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $failover_dr_replica_name = '';
+ /**
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ *
+ * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $dr_replica = false;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $failover_dr_replica_name
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ * @type bool $dr_replica
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ *
+ * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFailoverDrReplicaName()
+ {
+ return $this->failover_dr_replica_name;
+ }
+
+ /**
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ *
+ * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFailoverDrReplicaName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->failover_dr_replica_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ *
+ * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getDrReplica()
+ {
+ return $this->dr_replica;
+ }
+
+ /**
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ *
+ * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDrReplica($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->dr_replica = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/Settings.php b/SqlAdmin/src/V1/Settings.php
index c8f58188880..f577cf3cf31 100644
--- a/SqlAdmin/src/V1/Settings.php
+++ b/SqlAdmin/src/V1/Settings.php
@@ -252,6 +252,15 @@ class Settings extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37;
*/
private $data_cache_config = null;
+ /**
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $enable_google_ml_integration = null;
/**
* Constructor.
@@ -365,6 +374,11 @@ class Settings extends \Google\Protobuf\Internal\Message
* relevant only for SQL Server.
* @type \Google\Cloud\Sql\V1\DataCacheConfig $data_cache_config
* Configuration for data cache.
+ * @type \Google\Protobuf\BoolValue $enable_google_ml_integration
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
* }
*/
public function __construct($data = NULL) {
@@ -1680,5 +1694,80 @@ public function setDataCacheConfig($var)
return $this;
}
+ /**
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\BoolValue|null
+ */
+ public function getEnableGoogleMlIntegration()
+ {
+ return $this->enable_google_ml_integration;
+ }
+
+ public function hasEnableGoogleMlIntegration()
+ {
+ return isset($this->enable_google_ml_integration);
+ }
+
+ public function clearEnableGoogleMlIntegration()
+ {
+ unset($this->enable_google_ml_integration);
+ }
+
+ /**
+ * Returns the unboxed value from getEnableGoogleMlIntegration()
+
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool|null
+ */
+ public function getEnableGoogleMlIntegrationValue()
+ {
+ return $this->readWrapperValue("enable_google_ml_integration");
+ }
+
+ /**
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\BoolValue $var
+ * @return $this
+ */
+ public function setEnableGoogleMlIntegration($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
+ $this->enable_google_ml_integration = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
+
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool|null $var
+ * @return $this
+ */
+ public function setEnableGoogleMlIntegrationValue($var)
+ {
+ $this->writeWrapperValue("enable_google_ml_integration", $var);
+ return $this;}
+
}
diff --git a/SqlAdmin/src/V1/SqlDatabaseVersion.php b/SqlAdmin/src/V1/SqlDatabaseVersion.php
index 89df701db58..98b70d4298d 100644
--- a/SqlAdmin/src/V1/SqlDatabaseVersion.php
+++ b/SqlAdmin/src/V1/SqlDatabaseVersion.php
@@ -187,6 +187,30 @@ class SqlDatabaseVersion
* Generated from protobuf enum MYSQL_8_0_36 = 241;
*/
const MYSQL_8_0_36 = 241;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 37.
+ *
+ * Generated from protobuf enum MYSQL_8_0_37 = 355;
+ */
+ const MYSQL_8_0_37 = 355;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 38.
+ *
+ * Generated from protobuf enum MYSQL_8_0_38 = 356;
+ */
+ const MYSQL_8_0_38 = 356;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 39.
+ *
+ * Generated from protobuf enum MYSQL_8_0_39 = 357;
+ */
+ const MYSQL_8_0_39 = 357;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 40.
+ *
+ * Generated from protobuf enum MYSQL_8_0_40 = 358;
+ */
+ const MYSQL_8_0_40 = 358;
/**
* The database version is SQL Server 2019 Standard.
*
@@ -266,6 +290,10 @@ class SqlDatabaseVersion
self::MYSQL_8_0_34 => 'MYSQL_8_0_34',
self::MYSQL_8_0_35 => 'MYSQL_8_0_35',
self::MYSQL_8_0_36 => 'MYSQL_8_0_36',
+ self::MYSQL_8_0_37 => 'MYSQL_8_0_37',
+ self::MYSQL_8_0_38 => 'MYSQL_8_0_38',
+ self::MYSQL_8_0_39 => 'MYSQL_8_0_39',
+ self::MYSQL_8_0_40 => 'MYSQL_8_0_40',
self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD',
self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE',
self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS',
diff --git a/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php b/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php
index 6298ed3e95b..18c538dbf5e 100644
--- a/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php
+++ b/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php
@@ -257,6 +257,34 @@ class SqlExternalSyncSettingErrorType
* Generated from protobuf enum SUBSCRIPTION_CALCULATION_STATUS = 40;
*/
const SUBSCRIPTION_CALCULATION_STATUS = 40;
+ /**
+ * Count of subscriptions needed to sync source data for PostgreSQL
+ * database.
+ *
+ * Generated from protobuf enum PG_SUBSCRIPTION_COUNT = 41;
+ */
+ const PG_SUBSCRIPTION_COUNT = 41;
+ /**
+ * Final parallel level that is used to do migration.
+ *
+ * Generated from protobuf enum PG_SYNC_PARALLEL_LEVEL = 42;
+ */
+ const PG_SYNC_PARALLEL_LEVEL = 42;
+ /**
+ * The disk size of the replica instance is smaller than the data size of
+ * the source instance.
+ *
+ * Generated from protobuf enum INSUFFICIENT_DISK_SIZE = 43;
+ */
+ const INSUFFICIENT_DISK_SIZE = 43;
+ /**
+ * The data size of the source instance is greater than 1 TB, the number of
+ * cores of the replica instance is less than 8, and the memory of the
+ * replica is less than 32 GB.
+ *
+ * Generated from protobuf enum INSUFFICIENT_MACHINE_TIER = 44;
+ */
+ const INSUFFICIENT_MACHINE_TIER = 44;
private static $valueToName = [
self::SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED => 'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED',
@@ -300,6 +328,10 @@ class SqlExternalSyncSettingErrorType
self::SOURCE_MAX_SUBSCRIPTIONS => 'SOURCE_MAX_SUBSCRIPTIONS',
self::UNABLE_TO_VERIFY_DEFINERS => 'UNABLE_TO_VERIFY_DEFINERS',
self::SUBSCRIPTION_CALCULATION_STATUS => 'SUBSCRIPTION_CALCULATION_STATUS',
+ self::PG_SUBSCRIPTION_COUNT => 'PG_SUBSCRIPTION_COUNT',
+ self::PG_SYNC_PARALLEL_LEVEL => 'PG_SYNC_PARALLEL_LEVEL',
+ self::INSUFFICIENT_DISK_SIZE => 'INSUFFICIENT_DISK_SIZE',
+ self::INSUFFICIENT_MACHINE_TIER => 'INSUFFICIENT_MACHINE_TIER',
];
public static function name($value)
diff --git a/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php
new file mode 100644
index 00000000000..d66d621ebf5
--- /dev/null
+++ b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php
@@ -0,0 +1,161 @@
+google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest
+ */
+class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $instance = '';
+ /**
+ * Required. Project ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $project = '';
+ /**
+ * Required. The request body.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $body = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $instance
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ * @type string $project
+ * Required. Project ID of the project that contains the instance (Example:
+ * project-id).
+ * @type \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $body
+ * Required. The request body.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getInstance()
+ {
+ return $this->instance;
+ }
+
+ /**
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setInstance($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->instance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. Project ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getProject()
+ {
+ return $this->project;
+ }
+
+ /**
+ * Required. Project ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setProject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->project = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The request body.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED];
+ * @return \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest|null
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ public function hasBody()
+ {
+ return isset($this->body);
+ }
+
+ public function clearBody()
+ {
+ unset($this->body);
+ }
+
+ /**
+ * Required. The request body.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED];
+ * @param \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $var
+ * @return $this
+ */
+ public function setBody($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest::class);
+ $this->body = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php
new file mode 100644
index 00000000000..f11b91f265b
--- /dev/null
+++ b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php
@@ -0,0 +1,67 @@
+google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseResponse
+ */
+class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ */
+ private $operation_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $operation_id
+ * The unique identifier for this operation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ * @return string
+ */
+ public function getOperationId()
+ {
+ return $this->operation_id;
+ }
+
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setOperationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->operation_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php
new file mode 100644
index 00000000000..a4585bf0c91
--- /dev/null
+++ b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php
@@ -0,0 +1,113 @@
+google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest
+ */
+class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * The instance ID contains lowercase letters, numbers, and hyphens, and it
+ * must start with a letter. This ID can have a maximum length of 98
+ * characters.
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $instance = '';
+ /**
+ * Required. The project ID that contains the instance.
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $project = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $instance
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * The instance ID contains lowercase letters, numbers, and hyphens, and it
+ * must start with a letter. This ID can have a maximum length of 98
+ * characters.
+ * @type string $project
+ * Required. The project ID that contains the instance.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * The instance ID contains lowercase letters, numbers, and hyphens, and it
+ * must start with a letter. This ID can have a maximum length of 98
+ * characters.
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getInstance()
+ {
+ return $this->instance;
+ }
+
+ /**
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * The instance ID contains lowercase letters, numbers, and hyphens, and it
+ * must start with a letter. This ID can have a maximum length of 98
+ * characters.
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setInstance($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->instance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The project ID that contains the instance.
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getProject()
+ {
+ return $this->project;
+ }
+
+ /**
+ * Required. The project ID that contains the instance.
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setProject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->project = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php
new file mode 100644
index 00000000000..3444ea0123a
--- /dev/null
+++ b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php
@@ -0,0 +1,67 @@
+google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseResponse
+ */
+class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ */
+ private $operation_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $operation_id
+ * The unique identifier for this operation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ * @return string
+ */
+ public function getOperationId()
+ {
+ return $this->operation_id;
+ }
+
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setOperationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->operation_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php b/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php
index 9cea84047e7..47a5d515ddd 100644
--- a/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php
+++ b/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php
@@ -46,6 +46,13 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes
* Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL];
*/
private $sync_parallel_level = 0;
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $migration_type = 0;
protected $sync_config;
/**
@@ -67,6 +74,9 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes
* @type int $sync_parallel_level
* Optional. Parallel level for initial data sync. Currently only applicable
* for MySQL.
+ * @type int $migration_type
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
* }
*/
public function __construct($data = NULL) {
@@ -237,6 +247,34 @@ public function setSyncParallelLevel($var)
return $this;
}
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMigrationType()
+ {
+ return $this->migration_type;
+ }
+
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMigrationType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class);
+ $this->migration_type = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php
index 55101b42f30..f376cd9abdf 100644
--- a/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php
+++ b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php
@@ -45,6 +45,20 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int
* Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
private $verify_replication_only = false;
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $migration_type = 0;
+ /**
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $sync_parallel_level = 0;
protected $sync_config;
/**
@@ -65,6 +79,12 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int
* Optional. Flag to verify settings required by replication setup only
* @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config
* Optional. MySQL-specific settings for start external sync.
+ * @type int $migration_type
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration
+ * @type int $sync_parallel_level
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
* }
*/
public function __construct($data = NULL) {
@@ -233,6 +253,62 @@ public function setMysqlSyncConfig($var)
return $this;
}
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMigrationType()
+ {
+ return $this->migration_type;
+ }
+
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMigrationType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class);
+ $this->migration_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getSyncParallelLevel()
+ {
+ return $this->sync_parallel_level;
+ }
+
+ /**
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setSyncParallelLevel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class);
+ $this->sync_parallel_level = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php
new file mode 100644
index 00000000000..a73bae42651
--- /dev/null
+++ b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php
@@ -0,0 +1,63 @@
+google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType
+ */
+class MigrationType
+{
+ /**
+ * Default value is logical migration
+ *
+ * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0;
+ */
+ const MIGRATION_TYPE_UNSPECIFIED = 0;
+ /**
+ * Logical Migrations
+ *
+ * Generated from protobuf enum LOGICAL = 1;
+ */
+ const LOGICAL = 1;
+ /**
+ * Physical file based Migrations
+ *
+ * Generated from protobuf enum PHYSICAL = 2;
+ */
+ const PHYSICAL = 2;
+
+ private static $valueToName = [
+ self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED',
+ self::LOGICAL => 'LOGICAL',
+ self::PHYSICAL => 'PHYSICAL',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/SqlAdmin/src/V1/gapic_metadata.json b/SqlAdmin/src/V1/gapic_metadata.json
index 82bcd33fb50..a32b84c8991 100644
--- a/SqlAdmin/src/V1/gapic_metadata.json
+++ b/SqlAdmin/src/V1/gapic_metadata.json
@@ -139,6 +139,11 @@
"grpc": {
"libraryClient": "SqlInstancesServiceGapicClient",
"rpcs": {
+ "AcquireSsrsLease": {
+ "methods": [
+ "acquireSsrsLease"
+ ]
+ },
"AddServerCa": {
"methods": [
"addServerCa"
@@ -234,6 +239,11 @@
"reencrypt"
]
},
+ "ReleaseSsrsLease": {
+ "methods": [
+ "releaseSsrsLease"
+ ]
+ },
"RescheduleMaintenance": {
"methods": [
"rescheduleMaintenance"
diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json b/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json
index 31b90aad90a..acab843eb19 100644
--- a/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json
+++ b/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json
@@ -26,6 +26,11 @@
}
},
"methods": {
+ "AcquireSsrsLease": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
"AddServerCa": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_1_codes",
@@ -121,6 +126,11 @@
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
+ "ReleaseSsrsLease": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
"RescheduleMaintenance": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_1_codes",
diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php
index 9a8d5c2df56..8a91a418699 100644
--- a/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php
+++ b/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php
@@ -23,6 +23,24 @@
return [
'interfaces' => [
'google.cloud.sql.v1.SqlInstancesService' => [
+ 'AcquireSsrsLease' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'project',
+ 'fieldAccessors' => [
+ 'getProject',
+ ],
+ ],
+ [
+ 'keyName' => 'instance',
+ 'fieldAccessors' => [
+ 'getInstance',
+ ],
+ ],
+ ],
+ ],
'AddServerCa' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\Sql\V1\Operation',
@@ -353,6 +371,24 @@
],
],
],
+ 'ReleaseSsrsLease' => [
+ 'callType' => \Google\ApiCore\Call::UNARY_CALL,
+ 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse',
+ 'headerParams' => [
+ [
+ 'keyName' => 'project',
+ 'fieldAccessors' => [
+ 'getProject',
+ ],
+ ],
+ [
+ 'keyName' => 'instance',
+ 'fieldAccessors' => [
+ 'getInstance',
+ ],
+ ],
+ ],
+ ],
'RescheduleMaintenance' => [
'callType' => \Google\ApiCore\Call::UNARY_CALL,
'responseType' => 'Google\Cloud\Sql\V1\Operation',
diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php
index 6e5988acb66..29c60fc1eb5 100644
--- a/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php
+++ b/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php
@@ -23,6 +23,23 @@
return [
'interfaces' => [
'google.cloud.sql.v1.SqlInstancesService' => [
+ 'AcquireSsrsLease' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/acquireSsrsLease',
+ 'body' => 'body',
+ 'placeholders' => [
+ 'instance' => [
+ 'getters' => [
+ 'getInstance',
+ ],
+ ],
+ 'project' => [
+ 'getters' => [
+ 'getProject',
+ ],
+ ],
+ ],
+ ],
'AddServerCa' => [
'method' => 'post',
'uriTemplate' => '/v1/projects/{project}/instances/{instance}/addServerCa',
@@ -328,6 +345,22 @@
],
],
],
+ 'ReleaseSsrsLease' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/releaseSsrsLease',
+ 'placeholders' => [
+ 'instance' => [
+ 'getters' => [
+ 'getInstance',
+ ],
+ ],
+ 'project' => [
+ 'getters' => [
+ 'getProject',
+ ],
+ ],
+ ],
+ ],
'RescheduleMaintenance' => [
'method' => 'post',
'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rescheduleMaintenance',
diff --git a/SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php b/SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php
new file mode 100644
index 00000000000..c8bf109437e
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php
@@ -0,0 +1,217 @@
+google.cloud.sql.v1beta4.AcquireSsrsLeaseContext
+ */
+class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ *
+ * Generated from protobuf field optional string setup_login = 1;
+ */
+ private $setup_login = null;
+ /**
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ *
+ * Generated from protobuf field optional string service_login = 2;
+ */
+ private $service_login = null;
+ /**
+ * The report database to be used for the SSRS setup.
+ *
+ * Generated from protobuf field optional string report_database = 3;
+ */
+ private $report_database = null;
+ /**
+ * Lease duration needed for the SSRS setup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration duration = 4;
+ */
+ private $duration = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $setup_login
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ * @type string $service_login
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ * @type string $report_database
+ * The report database to be used for the SSRS setup.
+ * @type \Google\Protobuf\Duration $duration
+ * Lease duration needed for the SSRS setup.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ *
+ * Generated from protobuf field optional string setup_login = 1;
+ * @return string
+ */
+ public function getSetupLogin()
+ {
+ return isset($this->setup_login) ? $this->setup_login : '';
+ }
+
+ public function hasSetupLogin()
+ {
+ return isset($this->setup_login);
+ }
+
+ public function clearSetupLogin()
+ {
+ unset($this->setup_login);
+ }
+
+ /**
+ * The username to be used as the setup login to connect to the database
+ * server for SSRS setup.
+ *
+ * Generated from protobuf field optional string setup_login = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSetupLogin($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->setup_login = $var;
+
+ return $this;
+ }
+
+ /**
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ *
+ * Generated from protobuf field optional string service_login = 2;
+ * @return string
+ */
+ public function getServiceLogin()
+ {
+ return isset($this->service_login) ? $this->service_login : '';
+ }
+
+ public function hasServiceLogin()
+ {
+ return isset($this->service_login);
+ }
+
+ public function clearServiceLogin()
+ {
+ unset($this->service_login);
+ }
+
+ /**
+ * The username to be used as the service login to connect to the report
+ * database for SSRS setup.
+ *
+ * Generated from protobuf field optional string service_login = 2;
+ * @param string $var
+ * @return $this
+ */
+ public function setServiceLogin($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->service_login = $var;
+
+ return $this;
+ }
+
+ /**
+ * The report database to be used for the SSRS setup.
+ *
+ * Generated from protobuf field optional string report_database = 3;
+ * @return string
+ */
+ public function getReportDatabase()
+ {
+ return isset($this->report_database) ? $this->report_database : '';
+ }
+
+ public function hasReportDatabase()
+ {
+ return isset($this->report_database);
+ }
+
+ public function clearReportDatabase()
+ {
+ unset($this->report_database);
+ }
+
+ /**
+ * The report database to be used for the SSRS setup.
+ *
+ * Generated from protobuf field optional string report_database = 3;
+ * @param string $var
+ * @return $this
+ */
+ public function setReportDatabase($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->report_database = $var;
+
+ return $this;
+ }
+
+ /**
+ * Lease duration needed for the SSRS setup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration duration = 4;
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getDuration()
+ {
+ return $this->duration;
+ }
+
+ public function hasDuration()
+ {
+ return isset($this->duration);
+ }
+
+ public function clearDuration()
+ {
+ unset($this->duration);
+ }
+
+ /**
+ * Lease duration needed for the SSRS setup.
+ *
+ * Generated from protobuf field optional .google.protobuf.Duration duration = 4;
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setDuration($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->duration = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/BackupConfiguration.php b/SqlAdmin/src/V1beta4/BackupConfiguration.php
index 1159732493b..e2e55186241 100644
--- a/SqlAdmin/src/V1beta4/BackupConfiguration.php
+++ b/SqlAdmin/src/V1beta4/BackupConfiguration.php
@@ -72,6 +72,13 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings backup_retention_settings = 10;
*/
private $backup_retention_settings = null;
+ /**
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $transactional_log_storage_state = null;
/**
* Constructor.
@@ -100,6 +107,9 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message
* restore, from 1-7.
* @type \Google\Cloud\Sql\V1beta4\BackupRetentionSettings $backup_retention_settings
* Backup retention settings.
+ * @type int $transactional_log_storage_state
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
* }
*/
public function __construct($data = NULL) {
@@ -546,5 +556,43 @@ public function setBackupRetentionSettings($var)
return $this;
}
+ /**
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return int
+ */
+ public function getTransactionalLogStorageState()
+ {
+ return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0;
+ }
+
+ public function hasTransactionalLogStorageState()
+ {
+ return isset($this->transactional_log_storage_state);
+ }
+
+ public function clearTransactionalLogStorageState()
+ {
+ unset($this->transactional_log_storage_state);
+ }
+
+ /**
+ * Output only. This value contains the storage location of transactional logs
+ * for the database for point-in-time recovery.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param int $var
+ * @return $this
+ */
+ public function setTransactionalLogStorageState($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BackupConfiguration\TransactionalLogStorageState::class);
+ $this->transactional_log_storage_state = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php b/SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php
new file mode 100644
index 00000000000..9b18b6a7219
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php
@@ -0,0 +1,79 @@
+google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState
+ */
+class TransactionalLogStorageState
+{
+ /**
+ * Unspecified.
+ *
+ * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0;
+ */
+ const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0;
+ /**
+ * The transaction logs for the instance are stored on a data disk.
+ *
+ * Generated from protobuf enum DISK = 1;
+ */
+ const DISK = 1;
+ /**
+ * The transaction logs for the instance are switching from being stored on
+ * a data disk to being stored in Cloud Storage.
+ *
+ * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2;
+ */
+ const SWITCHING_TO_CLOUD_STORAGE = 2;
+ /**
+ * The transaction logs for the instance are now stored in Cloud Storage.
+ * Previously, they were stored on a data disk.
+ *
+ * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3;
+ */
+ const SWITCHED_TO_CLOUD_STORAGE = 3;
+ /**
+ * The transaction logs for the instance are stored in Cloud Storage.
+ *
+ * Generated from protobuf enum CLOUD_STORAGE = 4;
+ */
+ const CLOUD_STORAGE = 4;
+
+ private static $valueToName = [
+ self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED',
+ self::DISK => 'DISK',
+ self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE',
+ self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE',
+ self::CLOUD_STORAGE => 'CLOUD_STORAGE',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/SqlAdmin/src/V1beta4/DatabaseInstance.php b/SqlAdmin/src/V1beta4/DatabaseInstance.php
index 23d73f832ac..8efed83d3db 100644
--- a/SqlAdmin/src/V1beta4/DatabaseInstance.php
+++ b/SqlAdmin/src/V1beta4/DatabaseInstance.php
@@ -302,6 +302,21 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message
* Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $write_endpoint = null;
+ /**
+ * The pair of a primary instance and disaster recovery (DR) replica.
+ * A DR replica is a cross-region replica that you designate
+ * for failover in the event that the primary instance
+ * has regional failure.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54;
+ */
+ private $replication_cluster = null;
+ /**
+ * Gemini instance configuration.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55;
+ */
+ private $gemini_config = null;
/**
* Constructor.
@@ -428,6 +443,13 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message
* Output only. DEPRECATED: please use write_endpoint instead.
* @type string $write_endpoint
* Output only. The dns name of the primary instance in a replication group.
+ * @type \Google\Cloud\Sql\V1beta4\ReplicationCluster $replication_cluster
+ * The pair of a primary instance and disaster recovery (DR) replica.
+ * A DR replica is a cross-region replica that you designate
+ * for failover in the event that the primary instance
+ * has regional failure.
+ * @type \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig $gemini_config
+ * Gemini instance configuration.
* }
*/
public function __construct($data = NULL) {
@@ -1872,5 +1894,83 @@ public function setWriteEndpoint($var)
return $this;
}
+ /**
+ * The pair of a primary instance and disaster recovery (DR) replica.
+ * A DR replica is a cross-region replica that you designate
+ * for failover in the event that the primary instance
+ * has regional failure.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54;
+ * @return \Google\Cloud\Sql\V1beta4\ReplicationCluster|null
+ */
+ public function getReplicationCluster()
+ {
+ return $this->replication_cluster;
+ }
+
+ public function hasReplicationCluster()
+ {
+ return isset($this->replication_cluster);
+ }
+
+ public function clearReplicationCluster()
+ {
+ unset($this->replication_cluster);
+ }
+
+ /**
+ * The pair of a primary instance and disaster recovery (DR) replica.
+ * A DR replica is a cross-region replica that you designate
+ * for failover in the event that the primary instance
+ * has regional failure.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54;
+ * @param \Google\Cloud\Sql\V1beta4\ReplicationCluster $var
+ * @return $this
+ */
+ public function setReplicationCluster($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ReplicationCluster::class);
+ $this->replication_cluster = $var;
+
+ return $this;
+ }
+
+ /**
+ * Gemini instance configuration.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55;
+ * @return \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig|null
+ */
+ public function getGeminiConfig()
+ {
+ return $this->gemini_config;
+ }
+
+ public function hasGeminiConfig()
+ {
+ return isset($this->gemini_config);
+ }
+
+ public function clearGeminiConfig()
+ {
+ unset($this->gemini_config);
+ }
+
+ /**
+ * Gemini instance configuration.
+ *
+ * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55;
+ * @param \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig $var
+ * @return $this
+ */
+ public function setGeminiConfig($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig::class);
+ $this->gemini_config = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php b/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php
index 52e7011fee8..d08d06b5136 100644
--- a/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php
+++ b/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php
@@ -35,6 +35,7 @@
use Google\ApiCore\ValidationException;
use Google\Auth\FetchAuthTokenInterface;
use Google\Cloud\Sql\V1beta4\DatabaseInstance;
+use Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest;
use Google\Cloud\Sql\V1beta4\InstancesCloneRequest;
use Google\Cloud\Sql\V1beta4\InstancesDemoteMasterRequest;
use Google\Cloud\Sql\V1beta4\InstancesDemoteRequest;
@@ -50,6 +51,8 @@
use Google\Cloud\Sql\V1beta4\MySqlSyncConfig;
use Google\Cloud\Sql\V1beta4\Operation;
use Google\Cloud\Sql\V1beta4\PerformDiskShrinkContext;
+use Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseRequest;
+use Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse;
use Google\Cloud\Sql\V1beta4\SqlInstancesAddServerCaRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesCloneRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesCreateEphemeralCertRequest;
@@ -71,6 +74,8 @@
use Google\Cloud\Sql\V1beta4\SqlInstancesPerformDiskShrinkRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesPromoteReplicaRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesReencryptRequest;
+use Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseRequest;
+use Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse;
use Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody;
use Google\Cloud\Sql\V1beta4\SqlInstancesResetReplicaSizeRequest;
@@ -85,6 +90,7 @@
use Google\Cloud\Sql\V1beta4\SqlInstancesTruncateLogRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesUpdateRequest;
use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest;
+use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType;
use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsResponse;
use Google\Cloud\Sql\V1beta4\SslCert;
use Google\Cloud\Sql\V1beta4\SslCertsCreateEphemeralRequest;
@@ -99,7 +105,9 @@
* ```
* $sqlInstancesServiceClient = new SqlInstancesServiceClient();
* try {
- * $response = $sqlInstancesServiceClient->addServerCa();
+ * $instance = 'instance';
+ * $project = 'project';
+ * $response = $sqlInstancesServiceClient->acquireSsrsLease($instance, $project);
* } finally {
* $sqlInstancesServiceClient->close();
* }
@@ -228,6 +236,73 @@ public function __construct(array $options = [])
$this->setClientOptions($clientOptions);
}
+ /**
+ * Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * Sample code:
+ * ```
+ * $sqlInstancesServiceClient = new SqlInstancesServiceClient();
+ * try {
+ * $instance = 'instance';
+ * $project = 'project';
+ * $response = $sqlInstancesServiceClient->acquireSsrsLease($instance, $project);
+ * } finally {
+ * $sqlInstancesServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $instance Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ * @param string $project Required. ID of the project that contains the instance (Example:
+ * project-id).
+ * @param array $optionalArgs {
+ * Optional.
+ *
+ * @type InstancesAcquireSsrsLeaseRequest $body
+ * The body for request to acquire an SSRS lease.
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return \Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse
+ *
+ * @throws ApiException if the remote call fails
+ *
+ * @experimental
+ */
+ public function acquireSsrsLease(
+ $instance,
+ $project,
+ array $optionalArgs = []
+ ) {
+ $request = new SqlInstancesAcquireSsrsLeaseRequest();
+ $requestParamHeaders = [];
+ $request->setInstance($instance);
+ $request->setProject($project);
+ $requestParamHeaders['instance'] = $instance;
+ $requestParamHeaders['project'] = $project;
+ if (isset($optionalArgs['body'])) {
+ $request->setBody($optionalArgs['body']);
+ }
+
+ $requestParams = new RequestParamsHeaderDescriptor(
+ $requestParamHeaders
+ );
+ $optionalArgs['headers'] = isset($optionalArgs['headers'])
+ ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
+ : $requestParams->getHeader();
+ return $this->startCall(
+ 'AcquireSsrsLease',
+ SqlInstancesAcquireSsrsLeaseResponse::class,
+ $optionalArgs,
+ $request
+ )->wait();
+ }
+
/**
* Add a new trusted Certificate Authority (CA) version for the specified
* instance. Required to prepare for a certificate rotation. If a CA version
@@ -1471,6 +1546,67 @@ public function reencrypt(array $optionalArgs = [])
)->wait();
}
+ /**
+ * Release a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * Sample code:
+ * ```
+ * $sqlInstancesServiceClient = new SqlInstancesServiceClient();
+ * try {
+ * $instance = 'instance';
+ * $project = 'project';
+ * $response = $sqlInstancesServiceClient->releaseSsrsLease($instance, $project);
+ * } finally {
+ * $sqlInstancesServiceClient->close();
+ * }
+ * ```
+ *
+ * @param string $instance Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * It's composed of lowercase letters, numbers, and hyphens, and it must start
+ * with a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ * @param string $project Required. The ID of the project that contains the instance (Example:
+ * project-id).
+ * @param array $optionalArgs {
+ * Optional.
+ *
+ * @type RetrySettings|array $retrySettings
+ * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
+ * associative array of retry settings parameters. See the documentation on
+ * {@see RetrySettings} for example usage.
+ * }
+ *
+ * @return \Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse
+ *
+ * @throws ApiException if the remote call fails
+ *
+ * @experimental
+ */
+ public function releaseSsrsLease(
+ $instance,
+ $project,
+ array $optionalArgs = []
+ ) {
+ $request = new SqlInstancesReleaseSsrsLeaseRequest();
+ $requestParamHeaders = [];
+ $request->setInstance($instance);
+ $request->setProject($project);
+ $requestParamHeaders['instance'] = $instance;
+ $requestParamHeaders['project'] = $project;
+ $requestParams = new RequestParamsHeaderDescriptor(
+ $requestParamHeaders
+ );
+ $optionalArgs['headers'] = isset($optionalArgs['headers'])
+ ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
+ : $requestParams->getHeader();
+ return $this->startCall(
+ 'ReleaseSsrsLease',
+ SqlInstancesReleaseSsrsLeaseResponse::class,
+ $optionalArgs,
+ $request
+ )->wait();
+ }
+
/**
* Reschedules the maintenance on the given instance.
*
@@ -1880,6 +2016,10 @@ public function rotateServerCa(array $optionalArgs = [])
* Optional. Parallel level for initial data sync. Currently only applicable
* for MySQL.
* For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel}
+ * @type int $migrationType
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType}
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
@@ -1922,6 +2062,10 @@ public function startExternalSync(array $optionalArgs = [])
$request->setSyncParallelLevel($optionalArgs['syncParallelLevel']);
}
+ if (isset($optionalArgs['migrationType'])) {
+ $request->setMigrationType($optionalArgs['migrationType']);
+ }
+
$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
@@ -2285,6 +2429,14 @@ public function update(array $optionalArgs = [])
* Optional. Flag to verify settings required by replication setup only
* @type MySqlSyncConfig $mysqlSyncConfig
* Optional. MySQL-specific settings for start external sync.
+ * @type int $migrationType
+ * Optional. MigrationType field decides if the migration is a physical file
+ * based migration or logical migration
+ * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType}
+ * @type int $syncParallelLevel
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel}
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
@@ -2331,6 +2483,14 @@ public function verifyExternalSyncSettings(array $optionalArgs = [])
$request->setMysqlSyncConfig($optionalArgs['mysqlSyncConfig']);
}
+ if (isset($optionalArgs['migrationType'])) {
+ $request->setMigrationType($optionalArgs['migrationType']);
+ }
+
+ if (isset($optionalArgs['syncParallelLevel'])) {
+ $request->setSyncParallelLevel($optionalArgs['syncParallelLevel']);
+ }
+
$requestParams = new RequestParamsHeaderDescriptor(
$requestParamHeaders
);
diff --git a/SqlAdmin/src/V1beta4/GeminiInstanceConfig.php b/SqlAdmin/src/V1beta4/GeminiInstanceConfig.php
new file mode 100644
index 00000000000..0ce6fcd8316
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/GeminiInstanceConfig.php
@@ -0,0 +1,297 @@
+google.cloud.sql.v1beta4.GeminiInstanceConfig
+ */
+class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Output only. Whether Gemini is enabled.
+ *
+ * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $entitled = null;
+ /**
+ * Output only. Whether vacuum management is enabled.
+ *
+ * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $google_vacuum_mgmt_enabled = null;
+ /**
+ * Output only. Whether oom session cancel is enabled.
+ *
+ * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $oom_session_cancel_enabled = null;
+ /**
+ * Output only. Whether active query is enabled.
+ *
+ * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $active_query_enabled = null;
+ /**
+ * Output only. Whether index advisor is enabled.
+ *
+ * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $index_advisor_enabled = null;
+ /**
+ * Output only. Whether flag recommender is enabled.
+ *
+ * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $flag_recommender_enabled = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type bool $entitled
+ * Output only. Whether Gemini is enabled.
+ * @type bool $google_vacuum_mgmt_enabled
+ * Output only. Whether vacuum management is enabled.
+ * @type bool $oom_session_cancel_enabled
+ * Output only. Whether oom session cancel is enabled.
+ * @type bool $active_query_enabled
+ * Output only. Whether active query is enabled.
+ * @type bool $index_advisor_enabled
+ * Output only. Whether index advisor is enabled.
+ * @type bool $flag_recommender_enabled
+ * Output only. Whether flag recommender is enabled.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Output only. Whether Gemini is enabled.
+ *
+ * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getEntitled()
+ {
+ return isset($this->entitled) ? $this->entitled : false;
+ }
+
+ public function hasEntitled()
+ {
+ return isset($this->entitled);
+ }
+
+ public function clearEntitled()
+ {
+ unset($this->entitled);
+ }
+
+ /**
+ * Output only. Whether Gemini is enabled.
+ *
+ * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setEntitled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->entitled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether vacuum management is enabled.
+ *
+ * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getGoogleVacuumMgmtEnabled()
+ {
+ return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false;
+ }
+
+ public function hasGoogleVacuumMgmtEnabled()
+ {
+ return isset($this->google_vacuum_mgmt_enabled);
+ }
+
+ public function clearGoogleVacuumMgmtEnabled()
+ {
+ unset($this->google_vacuum_mgmt_enabled);
+ }
+
+ /**
+ * Output only. Whether vacuum management is enabled.
+ *
+ * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setGoogleVacuumMgmtEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->google_vacuum_mgmt_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether oom session cancel is enabled.
+ *
+ * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getOomSessionCancelEnabled()
+ {
+ return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false;
+ }
+
+ public function hasOomSessionCancelEnabled()
+ {
+ return isset($this->oom_session_cancel_enabled);
+ }
+
+ public function clearOomSessionCancelEnabled()
+ {
+ unset($this->oom_session_cancel_enabled);
+ }
+
+ /**
+ * Output only. Whether oom session cancel is enabled.
+ *
+ * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setOomSessionCancelEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->oom_session_cancel_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether active query is enabled.
+ *
+ * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getActiveQueryEnabled()
+ {
+ return isset($this->active_query_enabled) ? $this->active_query_enabled : false;
+ }
+
+ public function hasActiveQueryEnabled()
+ {
+ return isset($this->active_query_enabled);
+ }
+
+ public function clearActiveQueryEnabled()
+ {
+ unset($this->active_query_enabled);
+ }
+
+ /**
+ * Output only. Whether active query is enabled.
+ *
+ * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setActiveQueryEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->active_query_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether index advisor is enabled.
+ *
+ * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getIndexAdvisorEnabled()
+ {
+ return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false;
+ }
+
+ public function hasIndexAdvisorEnabled()
+ {
+ return isset($this->index_advisor_enabled);
+ }
+
+ public function clearIndexAdvisorEnabled()
+ {
+ unset($this->index_advisor_enabled);
+ }
+
+ /**
+ * Output only. Whether index advisor is enabled.
+ *
+ * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setIndexAdvisorEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->index_advisor_enabled = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. Whether flag recommender is enabled.
+ *
+ * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getFlagRecommenderEnabled()
+ {
+ return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false;
+ }
+
+ public function hasFlagRecommenderEnabled()
+ {
+ return isset($this->flag_recommender_enabled);
+ }
+
+ public function clearFlagRecommenderEnabled()
+ {
+ unset($this->flag_recommender_enabled);
+ }
+
+ /**
+ * Output only. Whether flag recommender is enabled.
+ *
+ * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setFlagRecommenderEnabled($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->flag_recommender_enabled = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/ImportContext.php b/SqlAdmin/src/V1beta4/ImportContext.php
index 6bdb78a79f2..9e0f7690d68 100644
--- a/SqlAdmin/src/V1beta4/ImportContext.php
+++ b/SqlAdmin/src/V1beta4/ImportContext.php
@@ -66,6 +66,12 @@ class ImportContext extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions bak_import_options = 7;
*/
private $bak_import_options = null;
+ /**
+ * Optional. Options for importing data from SQL statements.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $sql_import_options = null;
/**
* Constructor.
@@ -96,6 +102,8 @@ class ImportContext extends \Google\Protobuf\Internal\Message
* The PostgreSQL user for this import operation. PostgreSQL instances only.
* @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions $bak_import_options
* Import parameters specific to SQL Server .BAK files
+ * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions $sql_import_options
+ * Optional. Options for importing data from SQL statements.
* }
*/
public function __construct($data = NULL) {
@@ -323,5 +331,41 @@ public function setBakImportOptions($var)
return $this;
}
+ /**
+ * Optional. Options for importing data from SQL statements.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions|null
+ */
+ public function getSqlImportOptions()
+ {
+ return $this->sql_import_options;
+ }
+
+ public function hasSqlImportOptions()
+ {
+ return isset($this->sql_import_options);
+ }
+
+ public function clearSqlImportOptions()
+ {
+ unset($this->sql_import_options);
+ }
+
+ /**
+ * Optional. Options for importing data from SQL statements.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions $var
+ * @return $this
+ */
+ public function setSqlImportOptions($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions::class);
+ $this->sql_import_options = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php b/SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php
new file mode 100644
index 00000000000..d781dfd445e
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php
@@ -0,0 +1,174 @@
+google.cloud.sql.v1beta4.ImportContext.SqlImportOptions
+ */
+class SqlImportOptions extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $threads = null;
+ /**
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $parallel = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Protobuf\Int32Value $threads
+ * Optional. The number of threads to use for parallel import.
+ * @type \Google\Protobuf\BoolValue $parallel
+ * Optional. Whether or not the import should be parallel.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Int32Value|null
+ */
+ public function getThreads()
+ {
+ return $this->threads;
+ }
+
+ public function hasThreads()
+ {
+ return isset($this->threads);
+ }
+
+ public function clearThreads()
+ {
+ unset($this->threads);
+ }
+
+ /**
+ * Returns the unboxed value from getThreads()
+
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int|null
+ */
+ public function getThreadsValue()
+ {
+ return $this->readWrapperValue("threads");
+ }
+
+ /**
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Int32Value $var
+ * @return $this
+ */
+ public function setThreads($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
+ $this->threads = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
+
+ * Optional. The number of threads to use for parallel import.
+ *
+ * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int|null $var
+ * @return $this
+ */
+ public function setThreadsValue($var)
+ {
+ $this->writeWrapperValue("threads", $var);
+ return $this;}
+
+ /**
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\BoolValue|null
+ */
+ public function getParallel()
+ {
+ return $this->parallel;
+ }
+
+ public function hasParallel()
+ {
+ return isset($this->parallel);
+ }
+
+ public function clearParallel()
+ {
+ unset($this->parallel);
+ }
+
+ /**
+ * Returns the unboxed value from getParallel()
+
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool|null
+ */
+ public function getParallelValue()
+ {
+ return $this->readWrapperValue("parallel");
+ }
+
+ /**
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\BoolValue $var
+ * @return $this
+ */
+ public function setParallel($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
+ $this->parallel = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
+
+ * Optional. Whether or not the import should be parallel.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool|null $var
+ * @return $this
+ */
+ public function setParallelValue($var)
+ {
+ $this->writeWrapperValue("parallel", $var);
+ return $this;}
+
+}
+
+
diff --git a/SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php
new file mode 100644
index 00000000000..aa38e5bff65
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php
@@ -0,0 +1,77 @@
+google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest
+ */
+class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Contains details about the acquire SSRS lease operation.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
+ */
+ private $acquire_ssrs_lease_context = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $acquire_ssrs_lease_context
+ * Contains details about the acquire SSRS lease operation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Contains details about the acquire SSRS lease operation.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
+ * @return \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext|null
+ */
+ public function getAcquireSsrsLeaseContext()
+ {
+ return $this->acquire_ssrs_lease_context;
+ }
+
+ public function hasAcquireSsrsLeaseContext()
+ {
+ return isset($this->acquire_ssrs_lease_context);
+ }
+
+ public function clearAcquireSsrsLeaseContext()
+ {
+ unset($this->acquire_ssrs_lease_context);
+ }
+
+ /**
+ * Contains details about the acquire SSRS lease operation.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
+ * @param \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $var
+ * @return $this
+ */
+ public function setAcquireSsrsLeaseContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext::class);
+ $this->acquire_ssrs_lease_context = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/IpConfiguration.php b/SqlAdmin/src/V1beta4/IpConfiguration.php
index fba37b4505b..6f570c16aaf 100644
--- a/SqlAdmin/src/V1beta4/IpConfiguration.php
+++ b/SqlAdmin/src/V1beta4/IpConfiguration.php
@@ -31,7 +31,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
*/
private $private_network = '';
/**
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -70,20 +70,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
*/
private $enable_private_path_for_google_cloud_services = null;
/**
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
*
* Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;
*/
@@ -109,7 +111,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
* `/projects/myProject/global/networks/default`. This setting can
* be updated, but it cannot be removed after it is set.
* @type \Google\Protobuf\BoolValue $require_ssl
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -132,20 +134,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message
* Controls connectivity to private IP instances from Google services,
* such as BigQuery.
* @type int $ssl_mode
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
* @type \Google\Cloud\Sql\V1beta4\PscConfig $psc_config
* PSC settings for this instance.
* }
@@ -251,7 +255,7 @@ public function setPrivateNetwork($var)
}
/**
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -281,7 +285,7 @@ public function clearRequireSsl()
/**
* Returns the unboxed value from getRequireSsl()
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -299,7 +303,7 @@ public function getRequireSslValue()
}
/**
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -323,7 +327,7 @@ public function setRequireSsl($var)
/**
* Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
- * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag.
+ * Use `ssl_mode` instead.
* Whether SSL/TLS connections over IP are enforced.
* If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections.
* For SSL/TLS connections, the client certificate won't be verified. If
@@ -475,20 +479,22 @@ public function setEnablePrivatePathForGoogleCloudServicesValue($var)
return $this;}
/**
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
*
* Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;
* @return int
@@ -499,20 +505,22 @@ public function getSslMode()
}
/**
- * Specify how SSL/TLS is enforced in database connections. MySQL and
- * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag
- * for backward compatibility, then only the following value pairs are valid:
+ * Specify how SSL/TLS is enforced in database connections. If you must use
+ * the `require_ssl` flag for backward compatibility, then only the following
+ * value pairs are valid:
+ * For PostgreSQL and MySQL:
* * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
* * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
* * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
+ * For SQL Server:
+ * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
+ * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
* The value of `ssl_mode` gets priority over the value of `require_ssl`. For
* example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
* the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
* `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
* and PostgreSQL databases respect `ssl_mode` in this case and accept only
* SSL connections.
- * SQL Server uses the `require_ssl` flag. You can set the value for this flag
- * to `true` or `false`.
*
* Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8;
* @param int $var
diff --git a/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php b/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php
index a112c0b2aa6..d9ba3359399 100644
--- a/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php
+++ b/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php
@@ -48,6 +48,7 @@ class SslMode
* [Cloud SQL
* Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors)
* to enforce client identity verification.
+ * This value is not applicable to SQL Server.
*
* Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3;
*/
diff --git a/SqlAdmin/src/V1beta4/Operation.php b/SqlAdmin/src/V1beta4/Operation.php
index bd3e83e511e..2eb82c343da 100644
--- a/SqlAdmin/src/V1beta4/Operation.php
+++ b/SqlAdmin/src/V1beta4/Operation.php
@@ -138,6 +138,12 @@ class Operation extends \Google\Protobuf\Internal\Message
* Generated from protobuf field string target_project = 15;
*/
private $target_project = '';
+ /**
+ * The context for acquire SSRS lease operation, if applicable.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20;
+ */
+ private $acquire_ssrs_lease_context = null;
/**
* Constructor.
@@ -199,6 +205,8 @@ class Operation extends \Google\Protobuf\Internal\Message
* The URI of this resource.
* @type string $target_project
* The project ID of the target instance related to this operation.
+ * @type \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $acquire_ssrs_lease_context
+ * The context for acquire SSRS lease operation, if applicable.
* }
*/
public function __construct($data = NULL) {
@@ -766,5 +774,41 @@ public function setTargetProject($var)
return $this;
}
+ /**
+ * The context for acquire SSRS lease operation, if applicable.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20;
+ * @return \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext|null
+ */
+ public function getAcquireSsrsLeaseContext()
+ {
+ return $this->acquire_ssrs_lease_context;
+ }
+
+ public function hasAcquireSsrsLeaseContext()
+ {
+ return isset($this->acquire_ssrs_lease_context);
+ }
+
+ public function clearAcquireSsrsLeaseContext()
+ {
+ unset($this->acquire_ssrs_lease_context);
+ }
+
+ /**
+ * The context for acquire SSRS lease operation, if applicable.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20;
+ * @param \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $var
+ * @return $this
+ */
+ public function setAcquireSsrsLeaseContext($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext::class);
+ $this->acquire_ssrs_lease_context = $var;
+
+ return $this;
+ }
+
}
diff --git a/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php b/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php
index 8a16c29d16d..95a74ec1496 100644
--- a/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php
+++ b/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php
@@ -245,6 +245,27 @@ class SqlOperationType
* Generated from protobuf enum SWITCHOVER = 39;
*/
const SWITCHOVER = 39;
+ /**
+ * Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42;
+ */
+ const ACQUIRE_SSRS_LEASE = 42;
+ /**
+ * Release a lease for the setup of SQL Server Reporting Services (SSRS).
+ *
+ * Generated from protobuf enum RELEASE_SSRS_LEASE = 43;
+ */
+ const RELEASE_SSRS_LEASE = 43;
+ /**
+ * Reconfigures old primary after a promote replica operation. Effect of a
+ * promote operation to the old primary is executed in this operation,
+ * asynchronously from the promote replica operation executed to the
+ * replica.
+ *
+ * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44;
+ */
+ const RECONFIGURE_OLD_PRIMARY = 44;
private static $valueToName = [
self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED',
@@ -286,6 +307,9 @@ class SqlOperationType
self::AUTO_RESTART => 'AUTO_RESTART',
self::REENCRYPT => 'REENCRYPT',
self::SWITCHOVER => 'SWITCHOVER',
+ self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE',
+ self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE',
+ self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY',
];
public static function name($value)
diff --git a/SqlAdmin/src/V1beta4/ReplicationCluster.php b/SqlAdmin/src/V1beta4/ReplicationCluster.php
new file mode 100644
index 00000000000..3cfb5ceed15
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/ReplicationCluster.php
@@ -0,0 +1,145 @@
+google.cloud.sql.v1beta4.ReplicationCluster
+ */
+class ReplicationCluster extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ *
+ * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $failover_dr_replica_name = null;
+ /**
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ *
+ * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $dr_replica = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $failover_dr_replica_name
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ * @type bool $dr_replica
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ *
+ * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @return string
+ */
+ public function getFailoverDrReplicaName()
+ {
+ return isset($this->failover_dr_replica_name) ? $this->failover_dr_replica_name : '';
+ }
+
+ public function hasFailoverDrReplicaName()
+ {
+ return isset($this->failover_dr_replica_name);
+ }
+
+ public function clearFailoverDrReplicaName()
+ {
+ unset($this->failover_dr_replica_name);
+ }
+
+ /**
+ * Optional. If the instance is a primary instance, then this field identifies
+ * the disaster recovery (DR) replica. A DR replica is an optional
+ * configuration for Enterprise Plus edition instances. If the instance is a
+ * read replica, then the field is not set. Users can set this field to set a
+ * designated DR replica for a primary. Removing this field removes the DR
+ * replica.
+ *
+ * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ * @param string $var
+ * @return $this
+ */
+ public function setFailoverDrReplicaName($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->failover_dr_replica_name = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ *
+ * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return bool
+ */
+ public function getDrReplica()
+ {
+ return isset($this->dr_replica) ? $this->dr_replica : false;
+ }
+
+ public function hasDrReplica()
+ {
+ return isset($this->dr_replica);
+ }
+
+ public function clearDrReplica()
+ {
+ unset($this->dr_replica);
+ }
+
+ /**
+ * Output only. read-only field that indicates if the replica is a dr_replica;
+ * not set for a primary.
+ *
+ * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param bool $var
+ * @return $this
+ */
+ public function setDrReplica($var)
+ {
+ GPBUtil::checkBool($var);
+ $this->dr_replica = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/Settings.php b/SqlAdmin/src/V1beta4/Settings.php
index 24d10e3ed77..5ade6e2a6f0 100644
--- a/SqlAdmin/src/V1beta4/Settings.php
+++ b/SqlAdmin/src/V1beta4/Settings.php
@@ -252,6 +252,15 @@ class Settings extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.cloud.sql.v1beta4.DataCacheConfig data_cache_config = 37;
*/
private $data_cache_config = null;
+ /**
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $enable_google_ml_integration = null;
/**
* Constructor.
@@ -365,6 +374,11 @@ class Settings extends \Google\Protobuf\Internal\Message
* relevant only for SQL Server.
* @type \Google\Cloud\Sql\V1beta4\DataCacheConfig $data_cache_config
* Configuration for data cache.
+ * @type \Google\Protobuf\BoolValue $enable_google_ml_integration
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
* }
*/
public function __construct($data = NULL) {
@@ -1680,5 +1694,80 @@ public function setDataCacheConfig($var)
return $this;
}
+ /**
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\BoolValue|null
+ */
+ public function getEnableGoogleMlIntegration()
+ {
+ return $this->enable_google_ml_integration;
+ }
+
+ public function hasEnableGoogleMlIntegration()
+ {
+ return isset($this->enable_google_ml_integration);
+ }
+
+ public function clearEnableGoogleMlIntegration()
+ {
+ unset($this->enable_google_ml_integration);
+ }
+
+ /**
+ * Returns the unboxed value from getEnableGoogleMlIntegration()
+
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @return bool|null
+ */
+ public function getEnableGoogleMlIntegrationValue()
+ {
+ return $this->readWrapperValue("enable_google_ml_integration");
+ }
+
+ /**
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\BoolValue $var
+ * @return $this
+ */
+ public function setEnableGoogleMlIntegration($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
+ $this->enable_google_ml_integration = $var;
+
+ return $this;
+ }
+
+ /**
+ * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
+
+ * Optional. When this parameter is set to true, Cloud SQL instances can
+ * connect to Vertex AI to pass requests for real-time predictions and
+ * insights to the AI. The default value is false. This applies only to Cloud
+ * SQL for PostgreSQL instances.
+ *
+ * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL];
+ * @param bool|null $var
+ * @return $this
+ */
+ public function setEnableGoogleMlIntegrationValue($var)
+ {
+ $this->writeWrapperValue("enable_google_ml_integration", $var);
+ return $this;}
+
}
diff --git a/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php b/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php
index 0d4a492ed29..a5072e10aa5 100644
--- a/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php
+++ b/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php
@@ -187,6 +187,30 @@ class SqlDatabaseVersion
* Generated from protobuf enum MYSQL_8_0_36 = 241;
*/
const MYSQL_8_0_36 = 241;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 37.
+ *
+ * Generated from protobuf enum MYSQL_8_0_37 = 355;
+ */
+ const MYSQL_8_0_37 = 355;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 38.
+ *
+ * Generated from protobuf enum MYSQL_8_0_38 = 356;
+ */
+ const MYSQL_8_0_38 = 356;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 39.
+ *
+ * Generated from protobuf enum MYSQL_8_0_39 = 357;
+ */
+ const MYSQL_8_0_39 = 357;
+ /**
+ * The database major version is MySQL 8.0 and the minor version is 40.
+ *
+ * Generated from protobuf enum MYSQL_8_0_40 = 358;
+ */
+ const MYSQL_8_0_40 = 358;
/**
* The database version is SQL Server 2019 Standard.
*
@@ -266,6 +290,10 @@ class SqlDatabaseVersion
self::MYSQL_8_0_34 => 'MYSQL_8_0_34',
self::MYSQL_8_0_35 => 'MYSQL_8_0_35',
self::MYSQL_8_0_36 => 'MYSQL_8_0_36',
+ self::MYSQL_8_0_37 => 'MYSQL_8_0_37',
+ self::MYSQL_8_0_38 => 'MYSQL_8_0_38',
+ self::MYSQL_8_0_39 => 'MYSQL_8_0_39',
+ self::MYSQL_8_0_40 => 'MYSQL_8_0_40',
self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD',
self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE',
self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS',
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php
new file mode 100644
index 00000000000..15c1ea5c726
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php
@@ -0,0 +1,161 @@
+google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest
+ */
+class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $instance = '';
+ /**
+ * Required. ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $project = '';
+ /**
+ * The body for request to acquire an SSRS lease.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100;
+ */
+ private $body = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $instance
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ * @type string $project
+ * Required. ID of the project that contains the instance (Example:
+ * project-id).
+ * @type \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest $body
+ * The body for request to acquire an SSRS lease.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getInstance()
+ {
+ return $this->instance;
+ }
+
+ /**
+ * Required. Cloud SQL instance ID. This doesn't include the project ID. It's
+ * composed of lowercase letters, numbers, and hyphens, and it must start with
+ * a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setInstance($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->instance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getProject()
+ {
+ return $this->project;
+ }
+
+ /**
+ * Required. ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setProject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->project = $var;
+
+ return $this;
+ }
+
+ /**
+ * The body for request to acquire an SSRS lease.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100;
+ * @return \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest|null
+ */
+ public function getBody()
+ {
+ return $this->body;
+ }
+
+ public function hasBody()
+ {
+ return isset($this->body);
+ }
+
+ public function clearBody()
+ {
+ unset($this->body);
+ }
+
+ /**
+ * The body for request to acquire an SSRS lease.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100;
+ * @param \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest $var
+ * @return $this
+ */
+ public function setBody($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest::class);
+ $this->body = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php
new file mode 100644
index 00000000000..f6f6448148c
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php
@@ -0,0 +1,77 @@
+google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseResponse
+ */
+class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field optional string operation_id = 1;
+ */
+ private $operation_id = null;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $operation_id
+ * The unique identifier for this operation.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field optional string operation_id = 1;
+ * @return string
+ */
+ public function getOperationId()
+ {
+ return isset($this->operation_id) ? $this->operation_id : '';
+ }
+
+ public function hasOperationId()
+ {
+ return isset($this->operation_id);
+ }
+
+ public function clearOperationId()
+ {
+ unset($this->operation_id);
+ }
+
+ /**
+ * The unique identifier for this operation.
+ *
+ * Generated from protobuf field optional string operation_id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setOperationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->operation_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php
new file mode 100644
index 00000000000..cb717163371
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php
@@ -0,0 +1,117 @@
+google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest
+ */
+class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * It's composed of lowercase letters, numbers, and hyphens, and it must start
+ * with a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $instance = '';
+ /**
+ * Required. The ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ */
+ private $project = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $instance
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * It's composed of lowercase letters, numbers, and hyphens, and it must start
+ * with a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ * @type string $project
+ * Required. The ID of the project that contains the instance (Example:
+ * project-id).
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * It's composed of lowercase letters, numbers, and hyphens, and it must start
+ * with a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getInstance()
+ {
+ return $this->instance;
+ }
+
+ /**
+ * Required. The Cloud SQL instance ID. This doesn't include the project ID.
+ * It's composed of lowercase letters, numbers, and hyphens, and it must start
+ * with a letter. The total length must be 98 characters or less (Example:
+ * instance-id).
+ *
+ * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setInstance($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->instance = $var;
+
+ return $this;
+ }
+
+ /**
+ * Required. The ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @return string
+ */
+ public function getProject()
+ {
+ return $this->project;
+ }
+
+ /**
+ * Required. The ID of the project that contains the instance (Example:
+ * project-id).
+ *
+ * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED];
+ * @param string $var
+ * @return $this
+ */
+ public function setProject($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->project = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php
new file mode 100644
index 00000000000..0ea3d2f79c3
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php
@@ -0,0 +1,67 @@
+google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseResponse
+ */
+class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * The operation ID.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ */
+ private $operation_id = '';
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $operation_id
+ * The operation ID.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * The operation ID.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ * @return string
+ */
+ public function getOperationId()
+ {
+ return $this->operation_id;
+ }
+
+ /**
+ * The operation ID.
+ *
+ * Generated from protobuf field string operation_id = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setOperationId($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->operation_id = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php
index 3d469525bc2..f9ad0d74541 100644
--- a/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php
+++ b/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php
@@ -44,6 +44,13 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes
* Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL];
*/
private $sync_parallel_level = 0;
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $migration_type = 0;
protected $sync_config;
/**
@@ -65,6 +72,9 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes
* @type int $sync_parallel_level
* Optional. Parallel level for initial data sync. Currently only applicable
* for MySQL.
+ * @type int $migration_type
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
* }
*/
public function __construct($data = NULL) {
@@ -235,6 +245,34 @@ public function setSyncParallelLevel($var)
return $this;
}
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMigrationType()
+ {
+ return $this->migration_type;
+ }
+
+ /**
+ * Optional. MigrationType decides if the migration is a physical file based
+ * migration or logical migration.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMigrationType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class);
+ $this->migration_type = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php
index e8a0b883e50..b0e70355a21 100644
--- a/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php
+++ b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php
@@ -43,6 +43,20 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int
* Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL];
*/
private $verify_replication_only = false;
+ /**
+ * Optional. MigrationType field decides if the migration is a physical file
+ * based migration or logical migration
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $migration_type = 0;
+ /**
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $sync_parallel_level = 0;
protected $sync_config;
/**
@@ -63,6 +77,12 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int
* Optional. Flag to verify settings required by replication setup only
* @type \Google\Cloud\Sql\V1beta4\MySqlSyncConfig $mysql_sync_config
* Optional. MySQL-specific settings for start external sync.
+ * @type int $migration_type
+ * Optional. MigrationType field decides if the migration is a physical file
+ * based migration or logical migration
+ * @type int $sync_parallel_level
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
* }
*/
public function __construct($data = NULL) {
@@ -231,6 +251,62 @@ public function setMysqlSyncConfig($var)
return $this;
}
+ /**
+ * Optional. MigrationType field decides if the migration is a physical file
+ * based migration or logical migration
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getMigrationType()
+ {
+ return $this->migration_type;
+ }
+
+ /**
+ * Optional. MigrationType field decides if the migration is a physical file
+ * based migration or logical migration
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setMigrationType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class);
+ $this->migration_type = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @return int
+ */
+ public function getSyncParallelLevel()
+ {
+ return $this->sync_parallel_level;
+ }
+
+ /**
+ * Optional. Parallel level for initial data sync. Currently only applicable
+ * for PostgreSQL.
+ *
+ * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL];
+ * @param int $var
+ * @return $this
+ */
+ public function setSyncParallelLevel($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel::class);
+ $this->sync_parallel_level = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php
new file mode 100644
index 00000000000..02e6833a98f
--- /dev/null
+++ b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php
@@ -0,0 +1,63 @@
+google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType
+ */
+class MigrationType
+{
+ /**
+ * If no migration type is specified it will be defaulted to LOGICAL.
+ *
+ * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0;
+ */
+ const MIGRATION_TYPE_UNSPECIFIED = 0;
+ /**
+ * Logical Migrations
+ *
+ * Generated from protobuf enum LOGICAL = 1;
+ */
+ const LOGICAL = 1;
+ /**
+ * Physical file based Migrations
+ *
+ * Generated from protobuf enum PHYSICAL = 2;
+ */
+ const PHYSICAL = 2;
+
+ private static $valueToName = [
+ self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED',
+ self::LOGICAL => 'LOGICAL',
+ self::PHYSICAL => 'PHYSICAL',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/SqlAdmin/src/V1beta4/gapic_metadata.json b/SqlAdmin/src/V1beta4/gapic_metadata.json
index 653c830da22..932d7dbbfc1 100644
--- a/SqlAdmin/src/V1beta4/gapic_metadata.json
+++ b/SqlAdmin/src/V1beta4/gapic_metadata.json
@@ -92,6 +92,11 @@
"grpc": {
"libraryClient": "SqlInstancesServiceGapicClient",
"rpcs": {
+ "AcquireSsrsLease": {
+ "methods": [
+ "acquireSsrsLease"
+ ]
+ },
"AddServerCa": {
"methods": [
"addServerCa"
@@ -187,6 +192,11 @@
"reencrypt"
]
},
+ "ReleaseSsrsLease": {
+ "methods": [
+ "releaseSsrsLease"
+ ]
+ },
"RescheduleMaintenance": {
"methods": [
"rescheduleMaintenance"
diff --git a/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json b/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json
index bbf1ebe22bc..57673d4b71f 100644
--- a/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json
+++ b/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json
@@ -26,6 +26,11 @@
}
},
"methods": {
+ "AcquireSsrsLease": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
"AddServerCa": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_1_codes",
@@ -121,6 +126,11 @@
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params"
},
+ "ReleaseSsrsLease": {
+ "timeout_millis": 60000,
+ "retry_codes_name": "no_retry_1_codes",
+ "retry_params_name": "no_retry_1_params"
+ },
"RescheduleMaintenance": {
"timeout_millis": 60000,
"retry_codes_name": "no_retry_1_codes",
diff --git a/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php
index 981162de4c6..3dd890d997d 100644
--- a/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php
+++ b/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php
@@ -23,6 +23,23 @@
return [
'interfaces' => [
'google.cloud.sql.v1beta4.SqlInstancesService' => [
+ 'AcquireSsrsLease' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease',
+ 'body' => 'body',
+ 'placeholders' => [
+ 'instance' => [
+ 'getters' => [
+ 'getInstance',
+ ],
+ ],
+ 'project' => [
+ 'getters' => [
+ 'getProject',
+ ],
+ ],
+ ],
+ ],
'AddServerCa' => [
'method' => 'post',
'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/addServerCa',
@@ -328,6 +345,22 @@
],
],
],
+ 'ReleaseSsrsLease' => [
+ 'method' => 'post',
+ 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease',
+ 'placeholders' => [
+ 'instance' => [
+ 'getters' => [
+ 'getInstance',
+ ],
+ ],
+ 'project' => [
+ 'getters' => [
+ 'getProject',
+ ],
+ ],
+ ],
+ ],
'RescheduleMaintenance' => [
'method' => 'post',
'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance',
diff --git a/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php b/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php
index 54c3251d0c6..28c10e28a19 100644
--- a/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php
+++ b/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php
@@ -29,10 +29,13 @@
use Google\Cloud\Sql\V1\Client\SqlInstancesServiceClient;
use Google\Cloud\Sql\V1\DatabaseInstance;
use Google\Cloud\Sql\V1\DemoteContext;
+use Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest;
use Google\Cloud\Sql\V1\InstancesDemoteRequest;
use Google\Cloud\Sql\V1\InstancesListResponse;
use Google\Cloud\Sql\V1\InstancesListServerCasResponse;
use Google\Cloud\Sql\V1\Operation;
+use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseRequest;
+use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse;
use Google\Cloud\Sql\V1\SqlInstancesAddServerCaRequest;
use Google\Cloud\Sql\V1\SqlInstancesCloneRequest;
use Google\Cloud\Sql\V1\SqlInstancesCreateEphemeralCertRequest;
@@ -54,6 +57,8 @@
use Google\Cloud\Sql\V1\SqlInstancesPerformDiskShrinkRequest;
use Google\Cloud\Sql\V1\SqlInstancesPromoteReplicaRequest;
use Google\Cloud\Sql\V1\SqlInstancesReencryptRequest;
+use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseRequest;
+use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse;
use Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequest;
use Google\Cloud\Sql\V1\SqlInstancesResetReplicaSizeRequest;
use Google\Cloud\Sql\V1\SqlInstancesResetSslConfigRequest;
@@ -100,6 +105,82 @@ private function createClient(array $options = [])
return new SqlInstancesServiceClient($options);
}
+ /** @test */
+ public function acquireSsrsLeaseTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $operationId = 'operationId-274116877';
+ $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse();
+ $expectedResponse->setOperationId($operationId);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $body = new InstancesAcquireSsrsLeaseRequest();
+ $request = (new SqlInstancesAcquireSsrsLeaseRequest())
+ ->setInstance($instance)
+ ->setProject($project)
+ ->setBody($body);
+ $response = $gapicClient->acquireSsrsLease($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall);
+ $actualValue = $actualRequestObject->getInstance();
+ $this->assertProtobufEquals($instance, $actualValue);
+ $actualValue = $actualRequestObject->getProject();
+ $this->assertProtobufEquals($project, $actualValue);
+ $actualValue = $actualRequestObject->getBody();
+ $this->assertProtobufEquals($body, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function acquireSsrsLeaseExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode([
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ], JSON_PRETTY_PRINT);
+ $transport->addResponse(null, $status);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $body = new InstancesAcquireSsrsLeaseRequest();
+ $request = (new SqlInstancesAcquireSsrsLeaseRequest())
+ ->setInstance($instance)
+ ->setProject($project)
+ ->setBody($body);
+ try {
+ $gapicClient->acquireSsrsLease($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function addServerCaTest()
{
@@ -1404,6 +1485,76 @@ public function reencryptExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function releaseSsrsLeaseTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $operationId = 'operationId-274116877';
+ $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse();
+ $expectedResponse->setOperationId($operationId);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $request = (new SqlInstancesReleaseSsrsLeaseRequest())
+ ->setInstance($instance)
+ ->setProject($project);
+ $response = $gapicClient->releaseSsrsLease($request);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall);
+ $actualValue = $actualRequestObject->getInstance();
+ $this->assertProtobufEquals($instance, $actualValue);
+ $actualValue = $actualRequestObject->getProject();
+ $this->assertProtobufEquals($project, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function releaseSsrsLeaseExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode([
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ], JSON_PRETTY_PRINT);
+ $transport->addResponse(null, $status);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $request = (new SqlInstancesReleaseSsrsLeaseRequest())
+ ->setInstance($instance)
+ ->setProject($project);
+ try {
+ $gapicClient->releaseSsrsLease($request);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function rescheduleMaintenanceTest()
{
@@ -2277,7 +2428,7 @@ public function verifyExternalSyncSettingsExceptionTest()
}
/** @test */
- public function addServerCaAsyncTest()
+ public function acquireSsrsLeaseAsyncTest()
{
$transport = $this->createTransport();
$gapicClient = $this->createClient([
@@ -2285,30 +2436,31 @@ public function addServerCaAsyncTest()
]);
$this->assertTrue($transport->isExhausted());
// Mock response
- $kind = 'kind3292052';
- $targetLink = 'targetLink-2084812312';
- $user = 'user3599307';
- $name = 'name3373707';
- $targetId = 'targetId-815576439';
- $selfLink = 'selfLink-1691268851';
- $targetProject = 'targetProject392184427';
- $expectedResponse = new Operation();
- $expectedResponse->setKind($kind);
- $expectedResponse->setTargetLink($targetLink);
- $expectedResponse->setUser($user);
- $expectedResponse->setName($name);
- $expectedResponse->setTargetId($targetId);
- $expectedResponse->setSelfLink($selfLink);
- $expectedResponse->setTargetProject($targetProject);
+ $operationId = 'operationId-274116877';
+ $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse();
+ $expectedResponse->setOperationId($operationId);
$transport->addResponse($expectedResponse);
- $request = new SqlInstancesAddServerCaRequest();
- $response = $gapicClient->addServerCaAsync($request)->wait();
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $body = new InstancesAcquireSsrsLeaseRequest();
+ $request = (new SqlInstancesAcquireSsrsLeaseRequest())
+ ->setInstance($instance)
+ ->setProject($project)
+ ->setBody($body);
+ $response = $gapicClient->acquireSsrsLeaseAsync($request)->wait();
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
$this->assertSame(1, count($actualRequests));
$actualFuncCall = $actualRequests[0]->getFuncCall();
$actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AddServerCa', $actualFuncCall);
+ $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall);
+ $actualValue = $actualRequestObject->getInstance();
+ $this->assertProtobufEquals($instance, $actualValue);
+ $actualValue = $actualRequestObject->getProject();
+ $this->assertProtobufEquals($project, $actualValue);
+ $actualValue = $actualRequestObject->getBody();
+ $this->assertProtobufEquals($body, $actualValue);
$this->assertTrue($transport->isExhausted());
}
}
diff --git a/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php b/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php
index 74d6d5426a6..199fa209d58 100644
--- a/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php
+++ b/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php
@@ -30,8 +30,10 @@
use Google\Cloud\Sql\V1beta4\InstancesListResponse;
use Google\Cloud\Sql\V1beta4\InstancesListServerCasResponse;
use Google\Cloud\Sql\V1beta4\Operation;
+use Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse;
use Google\Cloud\Sql\V1beta4\SqlInstancesGetDiskShrinkConfigResponse;
use Google\Cloud\Sql\V1beta4\SqlInstancesGetLatestRecoveryTimeResponse;
+use Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse;
use Google\Cloud\Sql\V1beta4\SqlInstancesServiceClient;
use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsResponse;
use Google\Cloud\Sql\V1beta4\SslCert;
@@ -66,6 +68,70 @@ private function createClient(array $options = [])
return new SqlInstancesServiceClient($options);
}
+ /** @test */
+ public function acquireSsrsLeaseTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $operationId = 'operationId-274116877';
+ $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse();
+ $expectedResponse->setOperationId($operationId);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $response = $gapicClient->acquireSsrsLease($instance, $project);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/AcquireSsrsLease', $actualFuncCall);
+ $actualValue = $actualRequestObject->getInstance();
+ $this->assertProtobufEquals($instance, $actualValue);
+ $actualValue = $actualRequestObject->getProject();
+ $this->assertProtobufEquals($project, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function acquireSsrsLeaseExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode([
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ], JSON_PRETTY_PRINT);
+ $transport->addResponse(null, $status);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ try {
+ $gapicClient->acquireSsrsLease($instance, $project);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function addServerCaTest()
{
@@ -1314,6 +1380,70 @@ public function reencryptExceptionTest()
$this->assertTrue($transport->isExhausted());
}
+ /** @test */
+ public function releaseSsrsLeaseTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ // Mock response
+ $operationId = 'operationId-274116877';
+ $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse();
+ $expectedResponse->setOperationId($operationId);
+ $transport->addResponse($expectedResponse);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ $response = $gapicClient->releaseSsrsLease($instance, $project);
+ $this->assertEquals($expectedResponse, $response);
+ $actualRequests = $transport->popReceivedCalls();
+ $this->assertSame(1, count($actualRequests));
+ $actualFuncCall = $actualRequests[0]->getFuncCall();
+ $actualRequestObject = $actualRequests[0]->getRequestObject();
+ $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall);
+ $actualValue = $actualRequestObject->getInstance();
+ $this->assertProtobufEquals($instance, $actualValue);
+ $actualValue = $actualRequestObject->getProject();
+ $this->assertProtobufEquals($project, $actualValue);
+ $this->assertTrue($transport->isExhausted());
+ }
+
+ /** @test */
+ public function releaseSsrsLeaseExceptionTest()
+ {
+ $transport = $this->createTransport();
+ $gapicClient = $this->createClient([
+ 'transport' => $transport,
+ ]);
+ $this->assertTrue($transport->isExhausted());
+ $status = new stdClass();
+ $status->code = Code::DATA_LOSS;
+ $status->details = 'internal error';
+ $expectedExceptionMessage = json_encode([
+ 'message' => 'internal error',
+ 'code' => Code::DATA_LOSS,
+ 'status' => 'DATA_LOSS',
+ 'details' => [],
+ ], JSON_PRETTY_PRINT);
+ $transport->addResponse(null, $status);
+ // Mock request
+ $instance = 'instance555127957';
+ $project = 'project-309310695';
+ try {
+ $gapicClient->releaseSsrsLease($instance, $project);
+ // If the $gapicClient method call did not throw, fail the test
+ $this->fail('Expected an ApiException, but no exception was thrown.');
+ } catch (ApiException $ex) {
+ $this->assertEquals($status->code, $ex->getCode());
+ $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
+ }
+ // Call popReceivedCalls to ensure the stub is exhausted
+ $transport->popReceivedCalls();
+ $this->assertTrue($transport->isExhausted());
+ }
+
/** @test */
public function rescheduleMaintenanceTest()
{