diff --git a/DataprocMetastore/.OwlBot.yaml b/DataprocMetastore/.OwlBot.yaml
index f02ac808c178..4483418334b9 100644
--- a/DataprocMetastore/.OwlBot.yaml
+++ b/DataprocMetastore/.OwlBot.yaml
@@ -1,4 +1,4 @@
deep-copy-regex:
- - source: /google/cloud/metastore/(.*)/.*-php/(.*)
+ - source: /google/cloud/metastore/(v1)/.*-php/(.*)
dest: /owl-bot-staging/DataprocMetastore/$1/$2
api-name: DataprocMetastore
diff --git a/DataprocMetastore/metadata/V1Alpha/Metastore.php b/DataprocMetastore/metadata/V1Alpha/Metastore.php
deleted file mode 100644
index f9a994e92307..000000000000
Binary files a/DataprocMetastore/metadata/V1Alpha/Metastore.php and /dev/null differ
diff --git a/DataprocMetastore/metadata/V1Alpha/MetastoreFederation.php b/DataprocMetastore/metadata/V1Alpha/MetastoreFederation.php
deleted file mode 100644
index aecfb10338b9..000000000000
Binary files a/DataprocMetastore/metadata/V1Alpha/MetastoreFederation.php and /dev/null differ
diff --git a/DataprocMetastore/metadata/V1Beta/Metastore.php b/DataprocMetastore/metadata/V1Beta/Metastore.php
deleted file mode 100644
index fcb0d46fe424..000000000000
Binary files a/DataprocMetastore/metadata/V1Beta/Metastore.php and /dev/null differ
diff --git a/DataprocMetastore/metadata/V1Beta/MetastoreFederation.php b/DataprocMetastore/metadata/V1Beta/MetastoreFederation.php
deleted file mode 100644
index 7d146c599bd6..000000000000
Binary files a/DataprocMetastore/metadata/V1Beta/MetastoreFederation.php and /dev/null differ
diff --git a/DataprocMetastore/src/V1alpha/AlterMetadataResourceLocationRequest.php b/DataprocMetastore/src/V1alpha/AlterMetadataResourceLocationRequest.php
deleted file mode 100644
index 31a4013d3717..000000000000
--- a/DataprocMetastore/src/V1alpha/AlterMetadataResourceLocationRequest.php
+++ /dev/null
@@ -1,164 +0,0 @@
-google.cloud.metastore.v1alpha.AlterMetadataResourceLocationRequest
- */
-class AlterMetadataResourceLocationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- *
- * Generated from protobuf field string resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $resource_name = '';
- /**
- * Required. The new location URI for the metadata resource.
- *
- * Generated from protobuf field string location_uri = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $location_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $resource_name
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- * @type string $location_uri
- * Required. The new location URI for the metadata resource.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- *
- * Generated from protobuf field string resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getResourceName()
- {
- return $this->resource_name;
- }
-
- /**
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- *
- * Generated from protobuf field string resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setResourceName($var)
- {
- GPBUtil::checkString($var, True);
- $this->resource_name = $var;
-
- return $this;
- }
-
- /**
- * Required. The new location URI for the metadata resource.
- *
- * Generated from protobuf field string location_uri = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getLocationUri()
- {
- return $this->location_uri;
- }
-
- /**
- * Required. The new location URI for the metadata resource.
- *
- * Generated from protobuf field string location_uri = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setLocationUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->location_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/AlterMetadataResourceLocationResponse.php b/DataprocMetastore/src/V1alpha/AlterMetadataResourceLocationResponse.php
deleted file mode 100644
index 3ee73fba1b82..000000000000
--- a/DataprocMetastore/src/V1alpha/AlterMetadataResourceLocationResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.cloud.metastore.v1alpha.AlterMetadataResourceLocationResponse
- */
-class AlterMetadataResourceLocationResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/AuxiliaryVersionConfig.php b/DataprocMetastore/src/V1alpha/AuxiliaryVersionConfig.php
deleted file mode 100644
index 2e500e1c4c1c..000000000000
--- a/DataprocMetastore/src/V1alpha/AuxiliaryVersionConfig.php
+++ /dev/null
@@ -1,169 +0,0 @@
-google.cloud.metastore.v1alpha.AuxiliaryVersionConfig
- */
-class AuxiliaryVersionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- *
- * Generated from protobuf field string version = 1;
- */
- protected $version = '';
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- *
- * Generated from protobuf field map config_overrides = 2;
- */
- private $config_overrides;
- /**
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $network_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $version
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- * @type array|\Google\Protobuf\Internal\MapField $config_overrides
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- * @type \Google\Cloud\Metastore\V1alpha\NetworkConfig $network_config
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- *
- * Generated from protobuf field string version = 1;
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- *
- * Generated from protobuf field string version = 1;
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getConfigOverrides()
- {
- return $this->config_overrides;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setConfigOverrides($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->config_overrides = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Metastore\V1alpha\NetworkConfig|null
- */
- public function getNetworkConfig()
- {
- return $this->network_config;
- }
-
- public function hasNetworkConfig()
- {
- return isset($this->network_config);
- }
-
- public function clearNetworkConfig()
- {
- unset($this->network_config);
- }
-
- /**
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Metastore\V1alpha\NetworkConfig $var
- * @return $this
- */
- public function setNetworkConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\NetworkConfig::class);
- $this->network_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/BackendMetastore.php b/DataprocMetastore/src/V1alpha/BackendMetastore.php
deleted file mode 100644
index 18e9b6dc1e3b..000000000000
--- a/DataprocMetastore/src/V1alpha/BackendMetastore.php
+++ /dev/null
@@ -1,125 +0,0 @@
-google.cloud.metastore.v1alpha.BackendMetastore
- */
-class BackendMetastore extends \Google\Protobuf\Internal\Message
-{
- /**
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * The type of the backend metastore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2;
- */
- protected $metastore_type = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- * @type int $metastore_type
- * The type of the backend metastore.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The type of the backend metastore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2;
- * @return int
- */
- public function getMetastoreType()
- {
- return $this->metastore_type;
- }
-
- /**
- * The type of the backend metastore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType metastore_type = 2;
- * @param int $var
- * @return $this
- */
- public function setMetastoreType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\BackendMetastore\MetastoreType::class);
- $this->metastore_type = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/BackendMetastore/MetastoreType.php b/DataprocMetastore/src/V1alpha/BackendMetastore/MetastoreType.php
deleted file mode 100644
index 4609b36407b4..000000000000
--- a/DataprocMetastore/src/V1alpha/BackendMetastore/MetastoreType.php
+++ /dev/null
@@ -1,69 +0,0 @@
-google.cloud.metastore.v1alpha.BackendMetastore.MetastoreType
- */
-class MetastoreType
-{
- /**
- * The metastore type is not set.
- *
- * Generated from protobuf enum METASTORE_TYPE_UNSPECIFIED = 0;
- */
- const METASTORE_TYPE_UNSPECIFIED = 0;
- /**
- * The backend metastore is Dataplex.
- *
- * Generated from protobuf enum DATAPLEX = 1;
- */
- const DATAPLEX = 1;
- /**
- * The backend metastore is BigQuery.
- *
- * Generated from protobuf enum BIGQUERY = 2;
- */
- const BIGQUERY = 2;
- /**
- * The backend metastore is Dataproc Metastore.
- *
- * Generated from protobuf enum DATAPROC_METASTORE = 3;
- */
- const DATAPROC_METASTORE = 3;
-
- private static $valueToName = [
- self::METASTORE_TYPE_UNSPECIFIED => 'METASTORE_TYPE_UNSPECIFIED',
- self::DATAPLEX => 'DATAPLEX',
- self::BIGQUERY => 'BIGQUERY',
- self::DATAPROC_METASTORE => 'DATAPROC_METASTORE',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Backup.php b/DataprocMetastore/src/V1alpha/Backup.php
deleted file mode 100644
index 18ed81b1adae..000000000000
--- a/DataprocMetastore/src/V1alpha/Backup.php
+++ /dev/null
@@ -1,305 +0,0 @@
-google.cloud.metastore.v1alpha.Backup
- */
-class Backup extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * Output only. The time when the backup was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the backup finished creating.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. The revision of the service at the time of backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $service_revision = null;
- /**
- * The description of the backup.
- *
- * Generated from protobuf field string description = 6;
- */
- protected $description = '';
- /**
- * Output only. Services that are restoring from the backup.
- *
- * Generated from protobuf field repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $restoring_services;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the backup was started.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the backup finished creating.
- * @type int $state
- * Output only. The current state of the backup.
- * @type \Google\Cloud\Metastore\V1alpha\Service $service_revision
- * Output only. The revision of the service at the time of backup.
- * @type string $description
- * The description of the backup.
- * @type array|\Google\Protobuf\Internal\RepeatedField $restoring_services
- * Output only. Services that are restoring from the backup.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the backup was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the backup was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the backup finished creating.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the backup finished creating.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Backup\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. The revision of the service at the time of backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Metastore\V1alpha\Service|null
- */
- public function getServiceRevision()
- {
- return $this->service_revision;
- }
-
- public function hasServiceRevision()
- {
- return isset($this->service_revision);
- }
-
- public function clearServiceRevision()
- {
- unset($this->service_revision);
- }
-
- /**
- * Output only. The revision of the service at the time of backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Metastore\V1alpha\Service $var
- * @return $this
- */
- public function setServiceRevision($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Service::class);
- $this->service_revision = $var;
-
- return $this;
- }
-
- /**
- * The description of the backup.
- *
- * Generated from protobuf field string description = 6;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * The description of the backup.
- *
- * Generated from protobuf field string description = 6;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Output only. Services that are restoring from the backup.
- *
- * Generated from protobuf field repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRestoringServices()
- {
- return $this->restoring_services;
- }
-
- /**
- * Output only. Services that are restoring from the backup.
- *
- * Generated from protobuf field repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRestoringServices($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->restoring_services = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Backup/State.php b/DataprocMetastore/src/V1alpha/Backup/State.php
deleted file mode 100644
index 42176f1a7b4a..000000000000
--- a/DataprocMetastore/src/V1alpha/Backup/State.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.cloud.metastore.v1alpha.Backup.State
- */
-class State
-{
- /**
- * The state of the backup is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The backup is being created.
- *
- * Generated from protobuf enum CREATING = 1;
- */
- const CREATING = 1;
- /**
- * The backup is being deleted.
- *
- * Generated from protobuf enum DELETING = 2;
- */
- const DELETING = 2;
- /**
- * The backup is active and ready to use.
- *
- * Generated from protobuf enum ACTIVE = 3;
- */
- const ACTIVE = 3;
- /**
- * The backup failed.
- *
- * Generated from protobuf enum FAILED = 4;
- */
- const FAILED = 4;
- /**
- * The backup is being restored.
- *
- * Generated from protobuf enum RESTORING = 5;
- */
- const RESTORING = 5;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::DELETING => 'DELETING',
- self::ACTIVE => 'ACTIVE',
- self::FAILED => 'FAILED',
- self::RESTORING => 'RESTORING',
- ];
-
- 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/DataprocMetastore/src/V1alpha/CreateBackupRequest.php b/DataprocMetastore/src/V1alpha/CreateBackupRequest.php
deleted file mode 100644
index 39661d2e07b9..000000000000
--- a/DataprocMetastore/src/V1alpha/CreateBackupRequest.php
+++ /dev/null
@@ -1,244 +0,0 @@
-google.cloud.metastore.v1alpha.CreateBackupRequest
- */
-class CreateBackupRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $backup_id = '';
- /**
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $backup = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type string $backup_id
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @type \Google\Cloud\Metastore\V1alpha\Backup $backup
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getBackupId()
- {
- return $this->backup_id;
- }
-
- /**
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setBackupId($var)
- {
- GPBUtil::checkString($var, True);
- $this->backup_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\Backup|null
- */
- public function getBackup()
- {
- return $this->backup;
- }
-
- public function hasBackup()
- {
- return isset($this->backup);
- }
-
- public function clearBackup()
- {
- unset($this->backup);
- }
-
- /**
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\Backup $var
- * @return $this
- */
- public function setBackup($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Backup::class);
- $this->backup = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/CreateFederationRequest.php b/DataprocMetastore/src/V1alpha/CreateFederationRequest.php
deleted file mode 100644
index f7ae924fc43b..000000000000
--- a/DataprocMetastore/src/V1alpha/CreateFederationRequest.php
+++ /dev/null
@@ -1,247 +0,0 @@
-google.cloud.metastore.v1alpha.CreateFederationRequest
- */
-class CreateFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string federation_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $federation_id = '';
- /**
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $federation = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type string $federation_id
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @type \Google\Cloud\Metastore\V1alpha\Federation $federation
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string federation_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getFederationId()
- {
- return $this->federation_id;
- }
-
- /**
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string federation_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setFederationId($var)
- {
- GPBUtil::checkString($var, True);
- $this->federation_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\Federation|null
- */
- public function getFederation()
- {
- return $this->federation;
- }
-
- public function hasFederation()
- {
- return isset($this->federation);
- }
-
- public function clearFederation()
- {
- unset($this->federation);
- }
-
- /**
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\Federation $var
- * @return $this
- */
- public function setFederation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Federation::class);
- $this->federation = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/CreateMetadataImportRequest.php b/DataprocMetastore/src/V1alpha/CreateMetadataImportRequest.php
deleted file mode 100644
index 2b1815d47c92..000000000000
--- a/DataprocMetastore/src/V1alpha/CreateMetadataImportRequest.php
+++ /dev/null
@@ -1,248 +0,0 @@
-google.cloud.metastore.v1alpha.CreateMetadataImportRequest
- */
-class CreateMetadataImportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $metadata_import_id = '';
- /**
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $metadata_import = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type string $metadata_import_id
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @type \Google\Cloud\Metastore\V1alpha\MetadataImport $metadata_import
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getMetadataImportId()
- {
- return $this->metadata_import_id;
- }
-
- /**
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setMetadataImportId($var)
- {
- GPBUtil::checkString($var, True);
- $this->metadata_import_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\MetadataImport|null
- */
- public function getMetadataImport()
- {
- return $this->metadata_import;
- }
-
- public function hasMetadataImport()
- {
- return isset($this->metadata_import);
- }
-
- public function clearMetadataImport()
- {
- unset($this->metadata_import);
- }
-
- /**
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\MetadataImport $var
- * @return $this
- */
- public function setMetadataImport($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\MetadataImport::class);
- $this->metadata_import = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/CreateServiceRequest.php b/DataprocMetastore/src/V1alpha/CreateServiceRequest.php
deleted file mode 100644
index de8438d87a9e..000000000000
--- a/DataprocMetastore/src/V1alpha/CreateServiceRequest.php
+++ /dev/null
@@ -1,248 +0,0 @@
-google.cloud.metastore.v1alpha.CreateServiceRequest
- */
-class CreateServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $service_id = '';
- /**
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $service = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type string $service_id
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @type \Google\Cloud\Metastore\V1alpha\Service $service
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getServiceId()
- {
- return $this->service_id;
- }
-
- /**
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setServiceId($var)
- {
- GPBUtil::checkString($var, True);
- $this->service_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\Service|null
- */
- public function getService()
- {
- return $this->service;
- }
-
- public function hasService()
- {
- return isset($this->service);
- }
-
- public function clearService()
- {
- unset($this->service);
- }
-
- /**
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\Service $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Service::class);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/DataCatalogConfig.php b/DataprocMetastore/src/V1alpha/DataCatalogConfig.php
deleted file mode 100644
index f252053725fd..000000000000
--- a/DataprocMetastore/src/V1alpha/DataCatalogConfig.php
+++ /dev/null
@@ -1,72 +0,0 @@
-google.cloud.metastore.v1alpha.DataCatalogConfig
- */
-class DataCatalogConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- *
- * Generated from protobuf field bool enabled = 2;
- */
- protected $enabled = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $enabled
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- *
- * Generated from protobuf field bool enabled = 2;
- * @return bool
- */
- public function getEnabled()
- {
- return $this->enabled;
- }
-
- /**
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- *
- * Generated from protobuf field bool enabled = 2;
- * @param bool $var
- * @return $this
- */
- public function setEnabled($var)
- {
- GPBUtil::checkBool($var);
- $this->enabled = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/DatabaseDumpSpec.php b/DataprocMetastore/src/V1alpha/DatabaseDumpSpec.php
deleted file mode 100644
index 775ad2d5ca0c..000000000000
--- a/DataprocMetastore/src/V1alpha/DatabaseDumpSpec.php
+++ /dev/null
@@ -1,33 +0,0 @@
-google.cloud.metastore.v1alpha.DatabaseDumpSpec
- */
-class DatabaseDumpSpec extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/DatabaseDumpSpec/Type.php b/DataprocMetastore/src/V1alpha/DatabaseDumpSpec/Type.php
deleted file mode 100644
index 4ad910d2d835..000000000000
--- a/DataprocMetastore/src/V1alpha/DatabaseDumpSpec/Type.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type
- */
-class Type
-{
- /**
- * The type of the database dump is unknown.
- *
- * Generated from protobuf enum TYPE_UNSPECIFIED = 0;
- */
- const TYPE_UNSPECIFIED = 0;
- /**
- * Database dump is a MySQL dump file.
- *
- * Generated from protobuf enum MYSQL = 1;
- */
- const MYSQL = 1;
- /**
- * Database dump contains Avro files.
- *
- * Generated from protobuf enum AVRO = 2;
- */
- const AVRO = 2;
-
- private static $valueToName = [
- self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
- self::MYSQL => 'MYSQL',
- self::AVRO => 'AVRO',
- ];
-
- 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/DataprocMetastore/src/V1alpha/DataplexConfig.php b/DataprocMetastore/src/V1alpha/DataplexConfig.php
deleted file mode 100644
index 0d5a00bd37c4..000000000000
--- a/DataprocMetastore/src/V1alpha/DataplexConfig.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.DataplexConfig
- */
-class DataplexConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- *
- * Generated from protobuf field map lake_resources = 1;
- */
- private $lake_resources;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $lake_resources
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- *
- * Generated from protobuf field map lake_resources = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLakeResources()
- {
- return $this->lake_resources;
- }
-
- /**
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- *
- * Generated from protobuf field map lake_resources = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLakeResources($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\Lake::class);
- $this->lake_resources = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/DataprocMetastoreClient.php b/DataprocMetastore/src/V1alpha/DataprocMetastoreClient.php
deleted file mode 100644
index 82e0f627c695..000000000000
--- a/DataprocMetastore/src/V1alpha/DataprocMetastoreClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
-google.cloud.metastore.v1alpha.DeleteBackupRequest
- */
-class DeleteBackupRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/DeleteFederationRequest.php b/DataprocMetastore/src/V1alpha/DeleteFederationRequest.php
deleted file mode 100644
index 8abf3ddbe788..000000000000
--- a/DataprocMetastore/src/V1alpha/DeleteFederationRequest.php
+++ /dev/null
@@ -1,145 +0,0 @@
-google.cloud.metastore.v1alpha.DeleteFederationRequest
- */
-class DeleteFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/DeleteServiceRequest.php b/DataprocMetastore/src/V1alpha/DeleteServiceRequest.php
deleted file mode 100644
index f7d6a866613d..000000000000
--- a/DataprocMetastore/src/V1alpha/DeleteServiceRequest.php
+++ /dev/null
@@ -1,146 +0,0 @@
-google.cloud.metastore.v1alpha.DeleteServiceRequest
- */
-class DeleteServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/EncryptionConfig.php b/DataprocMetastore/src/V1alpha/EncryptionConfig.php
deleted file mode 100644
index 1fc13fad7313..000000000000
--- a/DataprocMetastore/src/V1alpha/EncryptionConfig.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1alpha.EncryptionConfig
- */
-class EncryptionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- *
- * Generated from protobuf field string kms_key = 1;
- */
- protected $kms_key = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $kms_key
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- *
- * Generated from protobuf field string kms_key = 1;
- * @return string
- */
- public function getKmsKey()
- {
- return $this->kms_key;
- }
-
- /**
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- *
- * Generated from protobuf field string kms_key = 1;
- * @param string $var
- * @return $this
- */
- public function setKmsKey($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ErrorDetails.php b/DataprocMetastore/src/V1alpha/ErrorDetails.php
deleted file mode 100644
index 3181286b80d7..000000000000
--- a/DataprocMetastore/src/V1alpha/ErrorDetails.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.ErrorDetails
- */
-class ErrorDetails extends \Google\Protobuf\Internal\Message
-{
- /**
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- *
- * Generated from protobuf field map details = 1;
- */
- private $details;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $details
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- *
- * Generated from protobuf field map details = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getDetails()
- {
- return $this->details;
- }
-
- /**
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- *
- * Generated from protobuf field map details = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setDetails($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->details = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ExportMetadataRequest.php b/DataprocMetastore/src/V1alpha/ExportMetadataRequest.php
deleted file mode 100644
index 2cb051a9cdac..000000000000
--- a/DataprocMetastore/src/V1alpha/ExportMetadataRequest.php
+++ /dev/null
@@ -1,232 +0,0 @@
-google.cloud.metastore.v1alpha.ExportMetadataRequest
- */
-class ExportMetadataRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $database_dump_type = 0;
- protected $destination;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $destination_gcs_folder
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- * @type string $service
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @type int $database_dump_type
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- *
- * Generated from protobuf field string destination_gcs_folder = 2;
- * @return string
- */
- public function getDestinationGcsFolder()
- {
- return $this->readOneof(2);
- }
-
- public function hasDestinationGcsFolder()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- *
- * Generated from protobuf field string destination_gcs_folder = 2;
- * @param string $var
- * @return $this
- */
- public function setDestinationGcsFolder($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getDatabaseDumpType()
- {
- return $this->database_dump_type;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setDatabaseDumpType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\DatabaseDumpSpec\Type::class);
- $this->database_dump_type = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getDestination()
- {
- return $this->whichOneof("destination");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Federation.php b/DataprocMetastore/src/V1alpha/Federation.php
deleted file mode 100644
index fd83282f0ddb..000000000000
--- a/DataprocMetastore/src/V1alpha/Federation.php
+++ /dev/null
@@ -1,433 +0,0 @@
-google.cloud.metastore.v1alpha.Federation
- */
-class Federation extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * Output only. The time when the metastore federation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the metastore federation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * User-defined labels for the metastore federation.
- *
- * Generated from protobuf field map labels = 4;
- */
- private $labels;
- /**
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- *
- * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $version = '';
- /**
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- *
- * Generated from protobuf field map backend_metastores = 6;
- */
- private $backend_metastores;
- /**
- * Output only. The federation endpoint.
- *
- * Generated from protobuf field string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $endpoint_uri = '';
- /**
- * Output only. The current state of the federation.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- *
- * Generated from protobuf field string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state_message = '';
- /**
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- *
- * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the metastore federation was created.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The time when the metastore federation was last updated.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * User-defined labels for the metastore federation.
- * @type string $version
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- * @type array|\Google\Protobuf\Internal\MapField $backend_metastores
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- * @type string $endpoint_uri
- * Output only. The federation endpoint.
- * @type int $state
- * Output only. The current state of the federation.
- * @type string $state_message
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- * @type string $uid
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore federation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the metastore federation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore federation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The time when the metastore federation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * User-defined labels for the metastore federation.
- *
- * Generated from protobuf field map labels = 4;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * User-defined labels for the metastore federation.
- *
- * Generated from protobuf field map labels = 4;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
-
- return $this;
- }
-
- /**
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- *
- * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- *
- * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- *
- * Generated from protobuf field map backend_metastores = 6;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getBackendMetastores()
- {
- return $this->backend_metastores;
- }
-
- /**
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- *
- * Generated from protobuf field map backend_metastores = 6;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setBackendMetastores($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\BackendMetastore::class);
- $this->backend_metastores = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The federation endpoint.
- *
- * Generated from protobuf field string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEndpointUri()
- {
- return $this->endpoint_uri;
- }
-
- /**
- * Output only. The federation endpoint.
- *
- * Generated from protobuf field string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEndpointUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_uri = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the federation.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the federation.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Federation\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- *
- * Generated from protobuf field string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getStateMessage()
- {
- return $this->state_message;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- *
- * Generated from protobuf field string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setStateMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->state_message = $var;
-
- return $this;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- *
- * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- *
- * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Federation/State.php b/DataprocMetastore/src/V1alpha/Federation/State.php
deleted file mode 100644
index 3e64ec033e29..000000000000
--- a/DataprocMetastore/src/V1alpha/Federation/State.php
+++ /dev/null
@@ -1,85 +0,0 @@
-google.cloud.metastore.v1alpha.Federation.State
- */
-class State
-{
- /**
- * The state of the metastore federation is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metastore federation is in the process of being created.
- *
- * Generated from protobuf enum CREATING = 1;
- */
- const CREATING = 1;
- /**
- * The metastore federation is running and ready to serve queries.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * The metastore federation is being updated. It remains usable but cannot
- * accept additional update requests or be deleted at this time.
- *
- * Generated from protobuf enum UPDATING = 3;
- */
- const UPDATING = 3;
- /**
- * The metastore federation is undergoing deletion. It cannot be used.
- *
- * Generated from protobuf enum DELETING = 4;
- */
- const DELETING = 4;
- /**
- * The metastore federation has encountered an error and cannot be used. The
- * metastore federation should be deleted.
- *
- * Generated from protobuf enum ERROR = 5;
- */
- const ERROR = 5;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::ACTIVE => 'ACTIVE',
- self::UPDATING => 'UPDATING',
- self::DELETING => 'DELETING',
- self::ERROR => 'ERROR',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Gapic/DataprocMetastoreFederationGapicClient.php b/DataprocMetastore/src/V1alpha/Gapic/DataprocMetastoreFederationGapicClient.php
deleted file mode 100644
index 3fdc3e60219d..000000000000
--- a/DataprocMetastore/src/V1alpha/Gapic/DataprocMetastoreFederationGapicClient.php
+++ /dev/null
@@ -1,1084 +0,0 @@
-locationName('[PROJECT]', '[LOCATION]');
- * $federationId = 'federation_id';
- * $federation = new Federation();
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'createFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class DataprocMetastoreFederationGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.metastore.v1alpha.DataprocMetastoreFederation';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'metastore.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'metastore.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $federationNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/dataproc_metastore_federation_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/dataproc_metastore_federation_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/dataproc_metastore_federation_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/dataproc_metastore_federation_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getFederationNameTemplate()
- {
- if (self::$federationNameTemplate == null) {
- self::$federationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/federations/{federation}');
- }
-
- return self::$federationNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- return self::$locationNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'federation' => self::getFederationNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a federation
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $federation
- *
- * @return string The formatted federation resource.
- *
- * @experimental
- */
- public static function federationName($project, $location, $federation)
- {
- return self::getFederationNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'federation' => $federation,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- *
- * @experimental
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - federation: projects/{project}/locations/{location}/federations/{federation}
- * - location: projects/{project}/locations/{location}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'metastore.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Creates a metastore federation in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedParent = $dataprocMetastoreFederationClient->locationName('[PROJECT]', '[LOCATION]');
- * $federationId = 'federation_id';
- * $federation = new Federation();
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'createFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param string $federationId Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- *
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @param Federation $federation Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createFederation($parent, $federationId, $federation, array $optionalArgs = [])
- {
- $request = new CreateFederationRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setFederationId($federationId);
- $request->setFederation($federation);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateFederation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single federation.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedName = $dataprocMetastoreFederationClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- * $operationResponse = $dataprocMetastoreFederationClient->deleteFederation($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->deleteFederation($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'deleteFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteFederation($name, array $optionalArgs = [])
- {
- $request = new DeleteFederationRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteFederation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets the details of a single federation.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedName = $dataprocMetastoreFederationClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- * $response = $dataprocMetastoreFederationClient->getFederation($formattedName);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_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\Metastore\V1alpha\Federation
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getFederation($name, array $optionalArgs = [])
- {
- $request = new GetFederationRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetFederation', Federation::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists federations in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedParent = $dataprocMetastoreFederationClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listFederations($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listFederations($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listFederations($parent, array $optionalArgs = [])
- {
- $request = new ListFederationsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListFederations', $optionalArgs, ListFederationsResponse::class, $request);
- }
-
- /**
- * Updates the fields of a federation.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $updateMask = new FieldMask();
- * $federation = new Federation();
- * $operationResponse = $dataprocMetastoreFederationClient->updateFederation($updateMask, $federation);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->updateFederation($updateMask, $federation);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'updateFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param FieldMask $updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @param Federation $federation Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- *
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateFederation($updateMask, $federation, array $optionalArgs = [])
- {
- $request = new UpdateFederationRequest();
- $requestParamHeaders = [];
- $request->setUpdateMask($updateMask);
- $request->setFederation($federation);
- $requestParamHeaders['federation.name'] = $federation->getName();
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateFederation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $response = $dataprocMetastoreFederationClient->getLocation();
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Resource name for the location.
- * @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\Location\Location
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getLocation(array $optionalArgs = [])
- {
- $request = new GetLocationRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listLocations();
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listLocations();
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * The resource that owns the locations collection, if applicable.
- * @type string $filter
- * The standard list filter.
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listLocations(array $optionalArgs = [])
- {
- $request = new ListLocationsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations');
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $resource = 'resource';
- * $response = $dataprocMetastoreFederationClient->getIamPolicy($resource);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $dataprocMetastoreFederationClient->setIamPolicy($resource, $policy);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $dataprocMetastoreFederationClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @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\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/DataprocMetastore/src/V1alpha/Gapic/DataprocMetastoreGapicClient.php b/DataprocMetastore/src/V1alpha/Gapic/DataprocMetastoreGapicClient.php
deleted file mode 100644
index 8c133a7ff5d4..000000000000
--- a/DataprocMetastore/src/V1alpha/Gapic/DataprocMetastoreGapicClient.php
+++ /dev/null
@@ -1,2408 +0,0 @@
-serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $resourceName = 'resource_name';
- * $locationUri = 'location_uri';
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'alterMetadataResourceLocation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class DataprocMetastoreGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.metastore.v1alpha.DataprocMetastore';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'metastore.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'metastore.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $backupNameTemplate;
-
- private static $lakeNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $metadataImportNameTemplate;
-
- private static $networkNameTemplate;
-
- private static $serviceNameTemplate;
-
- private static $subnetworkNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/dataproc_metastore_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/dataproc_metastore_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/dataproc_metastore_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/dataproc_metastore_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getBackupNameTemplate()
- {
- if (self::$backupNameTemplate == null) {
- self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}/backups/{backup}');
- }
-
- return self::$backupNameTemplate;
- }
-
- private static function getLakeNameTemplate()
- {
- if (self::$lakeNameTemplate == null) {
- self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}');
- }
-
- return self::$lakeNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- return self::$locationNameTemplate;
- }
-
- private static function getMetadataImportNameTemplate()
- {
- if (self::$metadataImportNameTemplate == null) {
- self::$metadataImportNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}');
- }
-
- return self::$metadataImportNameTemplate;
- }
-
- private static function getNetworkNameTemplate()
- {
- if (self::$networkNameTemplate == null) {
- self::$networkNameTemplate = new PathTemplate('projects/{project}/global/networks/{network}');
- }
-
- return self::$networkNameTemplate;
- }
-
- private static function getServiceNameTemplate()
- {
- if (self::$serviceNameTemplate == null) {
- self::$serviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}');
- }
-
- return self::$serviceNameTemplate;
- }
-
- private static function getSubnetworkNameTemplate()
- {
- if (self::$subnetworkNameTemplate == null) {
- self::$subnetworkNameTemplate = new PathTemplate('projects/{project}/regions/{region}/subnetworks/{subnetwork}');
- }
-
- return self::$subnetworkNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'backup' => self::getBackupNameTemplate(),
- 'lake' => self::getLakeNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'metadataImport' => self::getMetadataImportNameTemplate(),
- 'network' => self::getNetworkNameTemplate(),
- 'service' => self::getServiceNameTemplate(),
- 'subnetwork' => self::getSubnetworkNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a backup
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $service
- * @param string $backup
- *
- * @return string The formatted backup resource.
- *
- * @experimental
- */
- public static function backupName($project, $location, $service, $backup)
- {
- return self::getBackupNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'service' => $service,
- 'backup' => $backup,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a lake
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $lake
- *
- * @return string The formatted lake resource.
- *
- * @experimental
- */
- public static function lakeName($project, $location, $lake)
- {
- return self::getLakeNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'lake' => $lake,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- *
- * @experimental
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * metadata_import resource.
- *
- * @param string $project
- * @param string $location
- * @param string $service
- * @param string $metadataImport
- *
- * @return string The formatted metadata_import resource.
- *
- * @experimental
- */
- public static function metadataImportName($project, $location, $service, $metadataImport)
- {
- return self::getMetadataImportNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'service' => $service,
- 'metadata_import' => $metadataImport,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a network
- * resource.
- *
- * @param string $project
- * @param string $network
- *
- * @return string The formatted network resource.
- *
- * @experimental
- */
- public static function networkName($project, $network)
- {
- return self::getNetworkNameTemplate()->render([
- 'project' => $project,
- 'network' => $network,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a service
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $service
- *
- * @return string The formatted service resource.
- *
- * @experimental
- */
- public static function serviceName($project, $location, $service)
- {
- return self::getServiceNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'service' => $service,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a subnetwork
- * resource.
- *
- * @param string $project
- * @param string $region
- * @param string $subnetwork
- *
- * @return string The formatted subnetwork resource.
- *
- * @experimental
- */
- public static function subnetworkName($project, $region, $subnetwork)
- {
- return self::getSubnetworkNameTemplate()->render([
- 'project' => $project,
- 'region' => $region,
- 'subnetwork' => $subnetwork,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - backup: projects/{project}/locations/{location}/services/{service}/backups/{backup}
- * - lake: projects/{project}/locations/{location}/lakes/{lake}
- * - location: projects/{project}/locations/{location}
- * - metadataImport: projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}
- * - network: projects/{project}/global/networks/{network}
- * - service: projects/{project}/locations/{location}/services/{service}
- * - subnetwork: projects/{project}/regions/{region}/subnetworks/{subnetwork}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'metastore.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Alter metadata resource location. The metadata resource can be a database,
- * table, or partition. This functionality only updates the parent directory
- * for the respective metadata resource and does not transfer any existing
- * data to the new location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $resourceName = 'resource_name';
- * $locationUri = 'location_uri';
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'alterMetadataResourceLocation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $resourceName Required. The relative metadata resource name in the following format.
- *
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- * @param string $locationUri Required. The new location URI for the metadata resource.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function alterMetadataResourceLocation($service, $resourceName, $locationUri, array $optionalArgs = [])
- {
- $request = new AlterMetadataResourceLocationRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setResourceName($resourceName);
- $request->setLocationUri($locationUri);
- $requestParamHeaders['service'] = $service;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('AlterMetadataResourceLocation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a new backup in a given project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $backupId = 'backup_id';
- * $backup = new Backup();
- * $operationResponse = $dataprocMetastoreClient->createBackup($formattedParent, $backupId, $backup);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->createBackup($formattedParent, $backupId, $backup);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'createBackup');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service in which to create a
- * backup of the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param string $backupId Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- *
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @param Backup $backup Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createBackup($parent, $backupId, $backup, array $optionalArgs = [])
- {
- $request = new CreateBackupRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setBackupId($backupId);
- $request->setBackup($backup);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a new MetadataImport in a given project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $metadataImportId = 'metadata_import_id';
- * $metadataImport = new MetadataImport();
- * $operationResponse = $dataprocMetastoreClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'createMetadataImport');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param string $metadataImportId Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- *
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @param MetadataImport $metadataImport Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createMetadataImport($parent, $metadataImportId, $metadataImport, array $optionalArgs = [])
- {
- $request = new CreateMetadataImportRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setMetadataImportId($metadataImportId);
- $request->setMetadataImport($metadataImport);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateMetadataImport', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a metastore service in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->locationName('[PROJECT]', '[LOCATION]');
- * $serviceId = 'service_id';
- * $service = new Service();
- * $operationResponse = $dataprocMetastoreClient->createService($formattedParent, $serviceId, $service);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->createService($formattedParent, $serviceId, $service);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'createService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param string $serviceId Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- *
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @param Service $service Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createService($parent, $serviceId, $service, array $optionalArgs = [])
- {
- $request = new CreateServiceRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setServiceId($serviceId);
- $request->setService($service);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single backup.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- * $operationResponse = $dataprocMetastoreClient->deleteBackup($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->deleteBackup($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'deleteBackup');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the backup to delete, in the
- * following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteBackup($name, array $optionalArgs = [])
- {
- $request = new DeleteBackupRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteBackup', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $operationResponse = $dataprocMetastoreClient->deleteService($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->deleteService($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'deleteService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore service to delete, in
- * the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteService($name, array $optionalArgs = [])
- {
- $request = new DeleteServiceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Exports metadata from a service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $operationResponse = $dataprocMetastoreClient->exportMetadata($formattedService);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->exportMetadata($formattedService);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'exportMetadata');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to run
- * export, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $destinationGcsFolder
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @type int $databaseDumpType
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- * For allowed values, use constants defined on {@see \Google\Cloud\Metastore\V1alpha\DatabaseDumpSpec\Type}
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function exportMetadata($service, array $optionalArgs = [])
- {
- $request = new ExportMetadataRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $requestParamHeaders['service'] = $service;
- if (isset($optionalArgs['destinationGcsFolder'])) {
- $request->setDestinationGcsFolder($optionalArgs['destinationGcsFolder']);
- }
-
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- if (isset($optionalArgs['databaseDumpType'])) {
- $request->setDatabaseDumpType($optionalArgs['databaseDumpType']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('ExportMetadata', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets details of a single backup.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- * $response = $dataprocMetastoreClient->getBackup($formattedName);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the backup to retrieve, in the
- * following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_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\Metastore\V1alpha\Backup
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getBackup($name, array $optionalArgs = [])
- {
- $request = new GetBackupRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetBackup', Backup::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets details of a single import.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->metadataImportName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[METADATA_IMPORT]');
- * $response = $dataprocMetastoreClient->getMetadataImport($formattedName);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_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\Metastore\V1alpha\MetadataImport
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getMetadataImport($name, array $optionalArgs = [])
- {
- $request = new GetMetadataImportRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetMetadataImport', MetadataImport::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the details of a single service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $response = $dataprocMetastoreClient->getService($formattedName);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_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\Metastore\V1alpha\Service
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getService($name, array $optionalArgs = [])
- {
- $request = new GetServiceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetService', Service::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists backups in a service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listBackups($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listBackups($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service whose backups to
- * list, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listBackups($parent, array $optionalArgs = [])
- {
- $request = new ListBackupsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request);
- }
-
- /**
- * Lists imports in a service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listMetadataImports($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listMetadataImports($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listMetadataImports($parent, array $optionalArgs = [])
- {
- $request = new ListMetadataImportsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListMetadataImports', $optionalArgs, ListMetadataImportsResponse::class, $request);
- }
-
- /**
- * Lists services in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listServices($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listServices($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listServices($parent, array $optionalArgs = [])
- {
- $request = new ListServicesRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListServices', $optionalArgs, ListServicesResponse::class, $request);
- }
-
- /**
- * Move a table to another database.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $tableName = 'table_name';
- * $dbName = 'db_name';
- * $destinationDbName = 'destination_db_name';
- * $operationResponse = $dataprocMetastoreClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'moveTableToDatabase');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $tableName Required. The name of the table to be moved.
- * @param string $dbName Required. The name of the database where the table resides.
- * @param string $destinationDbName Required. The name of the database where the table should be moved.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function moveTableToDatabase($service, $tableName, $dbName, $destinationDbName, array $optionalArgs = [])
- {
- $request = new MoveTableToDatabaseRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setTableName($tableName);
- $request->setDbName($dbName);
- $request->setDestinationDbName($destinationDbName);
- $requestParamHeaders['service'] = $service;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('MoveTableToDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Query DPMS metadata.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $query = 'query';
- * $operationResponse = $dataprocMetastoreClient->queryMetadata($formattedService, $query);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->queryMetadata($formattedService, $query);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'queryMetadata');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $query Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function queryMetadata($service, $query, array $optionalArgs = [])
- {
- $request = new QueryMetadataRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setQuery($query);
- $requestParamHeaders['service'] = $service;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('QueryMetadata', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Removes the attached IAM policies for a resource
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $response = $dataprocMetastoreClient->removeIamPolicy($resource);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $asynchronous
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- * @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\Metastore\V1alpha\RemoveIamPolicyResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function removeIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new RemoveIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['asynchronous'])) {
- $request->setAsynchronous($optionalArgs['asynchronous']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('RemoveIamPolicy', RemoveIamPolicyResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Restores a service from a backup.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $formattedBackup = $dataprocMetastoreClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- * $operationResponse = $dataprocMetastoreClient->restoreService($formattedService, $formattedBackup);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->restoreService($formattedService, $formattedBackup);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'restoreService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $backup Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $restoreType
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- * For allowed values, use constants defined on {@see \Google\Cloud\Metastore\V1alpha\Restore\RestoreType}
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function restoreService($service, $backup, array $optionalArgs = [])
- {
- $request = new RestoreServiceRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setBackup($backup);
- $requestParamHeaders['service'] = $service;
- if (isset($optionalArgs['restoreType'])) {
- $request->setRestoreType($optionalArgs['restoreType']);
- }
-
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('RestoreService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates a single import.
- * Only the description field of MetadataImport is supported to be updated.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $updateMask = new FieldMask();
- * $metadataImport = new MetadataImport();
- * $operationResponse = $dataprocMetastoreClient->updateMetadataImport($updateMask, $metadataImport);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->updateMetadataImport($updateMask, $metadataImport);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'updateMetadataImport');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param FieldMask $updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @param MetadataImport $metadataImport Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- *
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateMetadataImport($updateMask, $metadataImport, array $optionalArgs = [])
- {
- $request = new UpdateMetadataImportRequest();
- $requestParamHeaders = [];
- $request->setUpdateMask($updateMask);
- $request->setMetadataImport($metadataImport);
- $requestParamHeaders['metadata_import.name'] = $metadataImport->getName();
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateMetadataImport', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the parameters of a single service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $updateMask = new FieldMask();
- * $service = new Service();
- * $operationResponse = $dataprocMetastoreClient->updateService($updateMask, $service);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->updateService($updateMask, $service);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'updateService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param FieldMask $updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @param Service $service Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- *
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateService($updateMask, $service, array $optionalArgs = [])
- {
- $request = new UpdateServiceRequest();
- $requestParamHeaders = [];
- $request->setUpdateMask($updateMask);
- $request->setService($service);
- $requestParamHeaders['service.name'] = $service->getName();
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $response = $dataprocMetastoreClient->getLocation();
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Resource name for the location.
- * @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\Location\Location
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getLocation(array $optionalArgs = [])
- {
- $request = new GetLocationRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listLocations();
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listLocations();
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * The resource that owns the locations collection, if applicable.
- * @type string $filter
- * The standard list filter.
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listLocations(array $optionalArgs = [])
- {
- $request = new ListLocationsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations');
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $response = $dataprocMetastoreClient->getIamPolicy($resource);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $dataprocMetastoreClient->setIamPolicy($resource, $policy);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $dataprocMetastoreClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @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\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/DataprocMetastore/src/V1alpha/GetBackupRequest.php b/DataprocMetastore/src/V1alpha/GetBackupRequest.php
deleted file mode 100644
index cdbb85ee9226..000000000000
--- a/DataprocMetastore/src/V1alpha/GetBackupRequest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.GetBackupRequest
- */
-class GetBackupRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/GetFederationRequest.php b/DataprocMetastore/src/V1alpha/GetFederationRequest.php
deleted file mode 100644
index e8956ae561cc..000000000000
--- a/DataprocMetastore/src/V1alpha/GetFederationRequest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1alpha.GetFederationRequest
- */
-class GetFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/GetMetadataImportRequest.php b/DataprocMetastore/src/V1alpha/GetMetadataImportRequest.php
deleted file mode 100644
index e4c8b57eba8d..000000000000
--- a/DataprocMetastore/src/V1alpha/GetMetadataImportRequest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.GetMetadataImportRequest
- */
-class GetMetadataImportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/GetServiceRequest.php b/DataprocMetastore/src/V1alpha/GetServiceRequest.php
deleted file mode 100644
index 2cda29b7e3fe..000000000000
--- a/DataprocMetastore/src/V1alpha/GetServiceRequest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.GetServiceRequest
- */
-class GetServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/HiveMetastoreConfig.php b/DataprocMetastore/src/V1alpha/HiveMetastoreConfig.php
deleted file mode 100644
index b272e64f4210..000000000000
--- a/DataprocMetastore/src/V1alpha/HiveMetastoreConfig.php
+++ /dev/null
@@ -1,278 +0,0 @@
-google.cloud.metastore.v1alpha.HiveMetastoreConfig
- */
-class HiveMetastoreConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The Hive metastore schema version.
- *
- * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $version = '';
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- *
- * Generated from protobuf field map config_overrides = 2;
- */
- private $config_overrides;
- /**
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3;
- */
- protected $kerberos_config = null;
- /**
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4;
- */
- protected $endpoint_protocol = 0;
- /**
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- *
- * Generated from protobuf field map auxiliary_versions = 5;
- */
- private $auxiliary_versions;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $version
- * Immutable. The Hive metastore schema version.
- * @type array|\Google\Protobuf\Internal\MapField $config_overrides
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- * @type \Google\Cloud\Metastore\V1alpha\KerberosConfig $kerberos_config
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- * @type int $endpoint_protocol
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- * @type array|\Google\Protobuf\Internal\MapField $auxiliary_versions
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The Hive metastore schema version.
- *
- * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Immutable. The Hive metastore schema version.
- *
- * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getConfigOverrides()
- {
- return $this->config_overrides;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setConfigOverrides($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->config_overrides = $arr;
-
- return $this;
- }
-
- /**
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3;
- * @return \Google\Cloud\Metastore\V1alpha\KerberosConfig|null
- */
- public function getKerberosConfig()
- {
- return $this->kerberos_config;
- }
-
- public function hasKerberosConfig()
- {
- return isset($this->kerberos_config);
- }
-
- public function clearKerberosConfig()
- {
- unset($this->kerberos_config);
- }
-
- /**
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.KerberosConfig kerberos_config = 3;
- * @param \Google\Cloud\Metastore\V1alpha\KerberosConfig $var
- * @return $this
- */
- public function setKerberosConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\KerberosConfig::class);
- $this->kerberos_config = $var;
-
- return $this;
- }
-
- /**
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4;
- * @return int
- */
- public function getEndpointProtocol()
- {
- return $this->endpoint_protocol;
- }
-
- /**
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4;
- * @param int $var
- * @return $this
- */
- public function setEndpointProtocol($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\HiveMetastoreConfig\EndpointProtocol::class);
- $this->endpoint_protocol = $var;
-
- return $this;
- }
-
- /**
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- *
- * Generated from protobuf field map auxiliary_versions = 5;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAuxiliaryVersions()
- {
- return $this->auxiliary_versions;
- }
-
- /**
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- *
- * Generated from protobuf field map auxiliary_versions = 5;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAuxiliaryVersions($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\AuxiliaryVersionConfig::class);
- $this->auxiliary_versions = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/HiveMetastoreConfig/EndpointProtocol.php b/DataprocMetastore/src/V1alpha/HiveMetastoreConfig/EndpointProtocol.php
deleted file mode 100644
index 7955f567f6b5..000000000000
--- a/DataprocMetastore/src/V1alpha/HiveMetastoreConfig/EndpointProtocol.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1alpha.HiveMetastoreConfig.EndpointProtocol
- */
-class EndpointProtocol
-{
- /**
- * The protocol is not set.
- *
- * Generated from protobuf enum ENDPOINT_PROTOCOL_UNSPECIFIED = 0;
- */
- const ENDPOINT_PROTOCOL_UNSPECIFIED = 0;
- /**
- * Use the legacy Apache Thrift protocol for the metastore service endpoint.
- *
- * Generated from protobuf enum THRIFT = 1;
- */
- const THRIFT = 1;
- /**
- * Use the modernized gRPC protocol for the metastore service endpoint.
- *
- * Generated from protobuf enum GRPC = 2;
- */
- const GRPC = 2;
-
- private static $valueToName = [
- self::ENDPOINT_PROTOCOL_UNSPECIFIED => 'ENDPOINT_PROTOCOL_UNSPECIFIED',
- self::THRIFT => 'THRIFT',
- self::GRPC => 'GRPC',
- ];
-
- 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/DataprocMetastore/src/V1alpha/KerberosConfig.php b/DataprocMetastore/src/V1alpha/KerberosConfig.php
deleted file mode 100644
index be3cbd405066..000000000000
--- a/DataprocMetastore/src/V1alpha/KerberosConfig.php
+++ /dev/null
@@ -1,165 +0,0 @@
-google.cloud.metastore.v1alpha.KerberosConfig
- */
-class KerberosConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Secret keytab = 1;
- */
- protected $keytab = null;
- /**
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- *
- * Generated from protobuf field string principal = 2;
- */
- protected $principal = '';
- /**
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- *
- * Generated from protobuf field string krb5_config_gcs_uri = 3;
- */
- protected $krb5_config_gcs_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1alpha\Secret $keytab
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- * @type string $principal
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- * @type string $krb5_config_gcs_uri
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Secret keytab = 1;
- * @return \Google\Cloud\Metastore\V1alpha\Secret|null
- */
- public function getKeytab()
- {
- return $this->keytab;
- }
-
- public function hasKeytab()
- {
- return isset($this->keytab);
- }
-
- public function clearKeytab()
- {
- unset($this->keytab);
- }
-
- /**
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Secret keytab = 1;
- * @param \Google\Cloud\Metastore\V1alpha\Secret $var
- * @return $this
- */
- public function setKeytab($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Secret::class);
- $this->keytab = $var;
-
- return $this;
- }
-
- /**
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- *
- * Generated from protobuf field string principal = 2;
- * @return string
- */
- public function getPrincipal()
- {
- return $this->principal;
- }
-
- /**
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- *
- * Generated from protobuf field string principal = 2;
- * @param string $var
- * @return $this
- */
- public function setPrincipal($var)
- {
- GPBUtil::checkString($var, True);
- $this->principal = $var;
-
- return $this;
- }
-
- /**
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- *
- * Generated from protobuf field string krb5_config_gcs_uri = 3;
- * @return string
- */
- public function getKrb5ConfigGcsUri()
- {
- return $this->krb5_config_gcs_uri;
- }
-
- /**
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- *
- * Generated from protobuf field string krb5_config_gcs_uri = 3;
- * @param string $var
- * @return $this
- */
- public function setKrb5ConfigGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->krb5_config_gcs_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Lake.php b/DataprocMetastore/src/V1alpha/Lake.php
deleted file mode 100644
index 520f9c41748d..000000000000
--- a/DataprocMetastore/src/V1alpha/Lake.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1alpha.Lake
- */
-class Lake extends \Google\Protobuf\Internal\Message
-{
- /**
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListBackupsRequest.php b/DataprocMetastore/src/V1alpha/ListBackupsRequest.php
deleted file mode 100644
index db6747dc2550..000000000000
--- a/DataprocMetastore/src/V1alpha/ListBackupsRequest.php
+++ /dev/null
@@ -1,252 +0,0 @@
-google.cloud.metastore.v1alpha.ListBackupsRequest
- */
-class ListBackupsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- * @type int $page_size
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListBackupsResponse.php b/DataprocMetastore/src/V1alpha/ListBackupsResponse.php
deleted file mode 100644
index 25db12b281f9..000000000000
--- a/DataprocMetastore/src/V1alpha/ListBackupsResponse.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.metastore.v1alpha.ListBackupsResponse
- */
-class ListBackupsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The backups of the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Backup backups = 1;
- */
- private $backups;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\Backup>|\Google\Protobuf\Internal\RepeatedField $backups
- * The backups of the specified service.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The backups of the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Backup backups = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getBackups()
- {
- return $this->backups;
- }
-
- /**
- * The backups of the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Backup backups = 1;
- * @param array<\Google\Cloud\Metastore\V1alpha\Backup>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setBackups($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\Backup::class);
- $this->backups = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListFederationsRequest.php b/DataprocMetastore/src/V1alpha/ListFederationsRequest.php
deleted file mode 100644
index 12a4abc079b4..000000000000
--- a/DataprocMetastore/src/V1alpha/ListFederationsRequest.php
+++ /dev/null
@@ -1,251 +0,0 @@
-google.cloud.metastore.v1alpha.ListFederationsRequest
- */
-class ListFederationsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type int $page_size
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListFederationsResponse.php b/DataprocMetastore/src/V1alpha/ListFederationsResponse.php
deleted file mode 100644
index 6fe15394a05e..000000000000
--- a/DataprocMetastore/src/V1alpha/ListFederationsResponse.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.metastore.v1alpha.ListFederationsResponse
- */
-class ListFederationsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Federation federations = 1;
- */
- private $federations;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\Federation>|\Google\Protobuf\Internal\RepeatedField $federations
- * The services in the specified location.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Federation federations = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getFederations()
- {
- return $this->federations;
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Federation federations = 1;
- * @param array<\Google\Cloud\Metastore\V1alpha\Federation>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setFederations($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\Federation::class);
- $this->federations = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListMetadataImportsRequest.php b/DataprocMetastore/src/V1alpha/ListMetadataImportsRequest.php
deleted file mode 100644
index 7a022d5ed98d..000000000000
--- a/DataprocMetastore/src/V1alpha/ListMetadataImportsRequest.php
+++ /dev/null
@@ -1,252 +0,0 @@
-google.cloud.metastore.v1alpha.ListMetadataImportsRequest
- */
-class ListMetadataImportsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- * @type int $page_size
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListMetadataImportsResponse.php b/DataprocMetastore/src/V1alpha/ListMetadataImportsResponse.php
deleted file mode 100644
index 72e5d8c510ef..000000000000
--- a/DataprocMetastore/src/V1alpha/ListMetadataImportsResponse.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.metastore.v1alpha.ListMetadataImportsResponse
- */
-class ListMetadataImportsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The imports in the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1;
- */
- private $metadata_imports;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\MetadataImport>|\Google\Protobuf\Internal\RepeatedField $metadata_imports
- * The imports in the specified service.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The imports in the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetadataImports()
- {
- return $this->metadata_imports;
- }
-
- /**
- * The imports in the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.MetadataImport metadata_imports = 1;
- * @param array<\Google\Cloud\Metastore\V1alpha\MetadataImport>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetadataImports($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\MetadataImport::class);
- $this->metadata_imports = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListServicesRequest.php b/DataprocMetastore/src/V1alpha/ListServicesRequest.php
deleted file mode 100644
index f5213e46f8e7..000000000000
--- a/DataprocMetastore/src/V1alpha/ListServicesRequest.php
+++ /dev/null
@@ -1,256 +0,0 @@
-google.cloud.metastore.v1alpha.ListServicesRequest
- */
-class ListServicesRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type int $page_size
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ListServicesResponse.php b/DataprocMetastore/src/V1alpha/ListServicesResponse.php
deleted file mode 100644
index 721b2f06c113..000000000000
--- a/DataprocMetastore/src/V1alpha/ListServicesResponse.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.metastore.v1alpha.ListServicesResponse
- */
-class ListServicesResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Service services = 1;
- */
- private $services;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\Service>|\Google\Protobuf\Internal\RepeatedField $services
- * The services in the specified location.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Service services = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getServices()
- {
- return $this->services;
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Service services = 1;
- * @param array<\Google\Cloud\Metastore\V1alpha\Service>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setServices($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\Service::class);
- $this->services = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/LocationMetadata.php b/DataprocMetastore/src/V1alpha/LocationMetadata.php
deleted file mode 100644
index 068677258a75..000000000000
--- a/DataprocMetastore/src/V1alpha/LocationMetadata.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1alpha.LocationMetadata
- */
-class LocationMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1;
- */
- private $supported_hive_metastore_versions;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\LocationMetadata\HiveMetastoreVersion>|\Google\Protobuf\Internal\RepeatedField $supported_hive_metastore_versions
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSupportedHiveMetastoreVersions()
- {
- return $this->supported_hive_metastore_versions;
- }
-
- /**
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1;
- * @param array<\Google\Cloud\Metastore\V1alpha\LocationMetadata\HiveMetastoreVersion>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSupportedHiveMetastoreVersions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\LocationMetadata\HiveMetastoreVersion::class);
- $this->supported_hive_metastore_versions = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/LocationMetadata/HiveMetastoreVersion.php b/DataprocMetastore/src/V1alpha/LocationMetadata/HiveMetastoreVersion.php
deleted file mode 100644
index e3668ca8c4d1..000000000000
--- a/DataprocMetastore/src/V1alpha/LocationMetadata/HiveMetastoreVersion.php
+++ /dev/null
@@ -1,106 +0,0 @@
-google.cloud.metastore.v1alpha.LocationMetadata.HiveMetastoreVersion
- */
-class HiveMetastoreVersion extends \Google\Protobuf\Internal\Message
-{
- /**
- * The semantic version of the Hive Metastore software.
- *
- * Generated from protobuf field string version = 1;
- */
- protected $version = '';
- /**
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- *
- * Generated from protobuf field bool is_default = 2;
- */
- protected $is_default = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $version
- * The semantic version of the Hive Metastore software.
- * @type bool $is_default
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The semantic version of the Hive Metastore software.
- *
- * Generated from protobuf field string version = 1;
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * The semantic version of the Hive Metastore software.
- *
- * Generated from protobuf field string version = 1;
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- *
- * Generated from protobuf field bool is_default = 2;
- * @return bool
- */
- public function getIsDefault()
- {
- return $this->is_default;
- }
-
- /**
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- *
- * Generated from protobuf field bool is_default = 2;
- * @param bool $var
- * @return $this
- */
- public function setIsDefault($var)
- {
- GPBUtil::checkBool($var);
- $this->is_default = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/DataprocMetastore/src/V1alpha/MaintenanceWindow.php b/DataprocMetastore/src/V1alpha/MaintenanceWindow.php
deleted file mode 100644
index fc6b12ba7267..000000000000
--- a/DataprocMetastore/src/V1alpha/MaintenanceWindow.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.metastore.v1alpha.MaintenanceWindow
- */
-class MaintenanceWindow extends \Google\Protobuf\Internal\Message
-{
- /**
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- */
- protected $hour_of_day = null;
- /**
- * The day of week, when the window starts.
- *
- * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2;
- */
- protected $day_of_week = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Int32Value $hour_of_day
- * The hour of day (0-23) when the window starts.
- * @type int $day_of_week
- * The day of week, when the window starts.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @return \Google\Protobuf\Int32Value|null
- */
- public function getHourOfDay()
- {
- return $this->hour_of_day;
- }
-
- public function hasHourOfDay()
- {
- return isset($this->hour_of_day);
- }
-
- public function clearHourOfDay()
- {
- unset($this->hour_of_day);
- }
-
- /**
- * Returns the unboxed value from getHourOfDay()
-
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @return int|null
- */
- public function getHourOfDayUnwrapped()
- {
- return $this->readWrapperValue("hour_of_day");
- }
-
- /**
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @param \Google\Protobuf\Int32Value $var
- * @return $this
- */
- public function setHourOfDay($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
- $this->hour_of_day = $var;
-
- return $this;
- }
-
- /**
- * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
-
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @param int|null $var
- * @return $this
- */
- public function setHourOfDayUnwrapped($var)
- {
- $this->writeWrapperValue("hour_of_day", $var);
- return $this;}
-
- /**
- * The day of week, when the window starts.
- *
- * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2;
- * @return int
- */
- public function getDayOfWeek()
- {
- return $this->day_of_week;
- }
-
- /**
- * The day of week, when the window starts.
- *
- * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2;
- * @param int $var
- * @return $this
- */
- public function setDayOfWeek($var)
- {
- GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class);
- $this->day_of_week = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/MetadataExport.php b/DataprocMetastore/src/V1alpha/MetadataExport.php
deleted file mode 100644
index 6bdce9abf250..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataExport.php
+++ /dev/null
@@ -1,240 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataExport
- */
-class MetadataExport extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The time when the export started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $start_time = null;
- /**
- * Output only. The time when the export ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the export.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. The type of the database dump.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $database_dump_type = 0;
- protected $destination;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $destination_gcs_uri
- * Output only. A Cloud Storage URI of a folder that metadata are exported
- * to, in the form of
- * `gs:////`, where
- * `` is automatically generated.
- * @type \Google\Protobuf\Timestamp $start_time
- * Output only. The time when the export started.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the export ended.
- * @type int $state
- * Output only. The current state of the export.
- * @type int $database_dump_type
- * Output only. The type of the database dump.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. A Cloud Storage URI of a folder that metadata are exported
- * to, in the form of
- * `gs:////`, where
- * `` is automatically generated.
- *
- * Generated from protobuf field string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getDestinationGcsUri()
- {
- return $this->readOneof(4);
- }
-
- public function hasDestinationGcsUri()
- {
- return $this->hasOneof(4);
- }
-
- /**
- * Output only. A Cloud Storage URI of a folder that metadata are exported
- * to, in the form of
- * `gs:////`, where
- * `` is automatically generated.
- *
- * Generated from protobuf field string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setDestinationGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(4, $var);
-
- return $this;
- }
-
- /**
- * Output only. The time when the export started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Output only. The time when the export started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the export ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the export ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the export.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the export.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\MetadataExport\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. The type of the database dump.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getDatabaseDumpType()
- {
- return $this->database_dump_type;
- }
-
- /**
- * Output only. The type of the database dump.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setDatabaseDumpType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\DatabaseDumpSpec\Type::class);
- $this->database_dump_type = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getDestination()
- {
- return $this->whichOneof("destination");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/MetadataExport/State.php b/DataprocMetastore/src/V1alpha/MetadataExport/State.php
deleted file mode 100644
index b7b46b19ba1f..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataExport/State.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataExport.State
- */
-class State
-{
- /**
- * The state of the metadata export is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metadata export is running.
- *
- * Generated from protobuf enum RUNNING = 1;
- */
- const RUNNING = 1;
- /**
- * The metadata export completed successfully.
- *
- * Generated from protobuf enum SUCCEEDED = 2;
- */
- const SUCCEEDED = 2;
- /**
- * The metadata export failed.
- *
- * Generated from protobuf enum FAILED = 3;
- */
- const FAILED = 3;
- /**
- * The metadata export is cancelled.
- *
- * Generated from protobuf enum CANCELLED = 4;
- */
- const CANCELLED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::RUNNING => 'RUNNING',
- self::SUCCEEDED => 'SUCCEEDED',
- self::FAILED => 'FAILED',
- self::CANCELLED => 'CANCELLED',
- ];
-
- 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/DataprocMetastore/src/V1alpha/MetadataImport.php b/DataprocMetastore/src/V1alpha/MetadataImport.php
deleted file mode 100644
index 83e73bbccf93..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataImport.php
+++ /dev/null
@@ -1,313 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataImport
- */
-class MetadataImport extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * The description of the metadata import.
- *
- * Generated from protobuf field string description = 2;
- */
- protected $description = '';
- /**
- * Output only. The time when the metadata import was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the metadata import was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * Output only. The time when the metadata import finished.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the metadata import.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- protected $metadata;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1alpha\MetadataImport\DatabaseDump $database_dump
- * Immutable. A database dump from a pre-existing metastore's database.
- * @type string $name
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- * @type string $description
- * The description of the metadata import.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the metadata import was started.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The time when the metadata import was last updated.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the metadata import finished.
- * @type int $state
- * Output only. The current state of the metadata import.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. A database dump from a pre-existing metastore's database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE];
- * @return \Google\Cloud\Metastore\V1alpha\MetadataImport\DatabaseDump|null
- */
- public function getDatabaseDump()
- {
- return $this->readOneof(6);
- }
-
- public function hasDatabaseDump()
- {
- return $this->hasOneof(6);
- }
-
- /**
- * Immutable. A database dump from a pre-existing metastore's database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE];
- * @param \Google\Cloud\Metastore\V1alpha\MetadataImport\DatabaseDump $var
- * @return $this
- */
- public function setDatabaseDump($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\MetadataImport\DatabaseDump::class);
- $this->writeOneof(6, $var);
-
- return $this;
- }
-
- /**
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The description of the metadata import.
- *
- * Generated from protobuf field string description = 2;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * The description of the metadata import.
- *
- * Generated from protobuf field string description = 2;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metadata import was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the metadata import was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metadata import was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The time when the metadata import was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metadata import finished.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the metadata import finished.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the metadata import.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the metadata import.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\MetadataImport\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getMetadata()
- {
- return $this->whichOneof("metadata");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/MetadataImport/DatabaseDump.php b/DataprocMetastore/src/V1alpha/MetadataImport/DatabaseDump.php
deleted file mode 100644
index 0a964226a362..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataImport/DatabaseDump.php
+++ /dev/null
@@ -1,189 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump
- */
-class DatabaseDump extends \Google\Protobuf\Internal\Message
-{
- /**
- * The type of the database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];
- * @deprecated
- */
- protected $database_type = 0;
- /**
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- *
- * Generated from protobuf field string gcs_uri = 2;
- */
- protected $gcs_uri = '';
- /**
- * The name of the source database.
- *
- * Generated from protobuf field string source_database = 3 [deprecated = true];
- * @deprecated
- */
- protected $source_database = '';
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $type = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $database_type
- * The type of the database.
- * @type string $gcs_uri
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- * @type string $source_database
- * The name of the source database.
- * @type int $type
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The type of the database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];
- * @return int
- * @deprecated
- */
- public function getDatabaseType()
- {
- @trigger_error('database_type is deprecated.', E_USER_DEPRECATED);
- return $this->database_type;
- }
-
- /**
- * The type of the database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];
- * @param int $var
- * @return $this
- * @deprecated
- */
- public function setDatabaseType($var)
- {
- @trigger_error('database_type is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\MetadataImport\DatabaseDump\DatabaseType::class);
- $this->database_type = $var;
-
- return $this;
- }
-
- /**
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- *
- * Generated from protobuf field string gcs_uri = 2;
- * @return string
- */
- public function getGcsUri()
- {
- return $this->gcs_uri;
- }
-
- /**
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- *
- * Generated from protobuf field string gcs_uri = 2;
- * @param string $var
- * @return $this
- */
- public function setGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->gcs_uri = $var;
-
- return $this;
- }
-
- /**
- * The name of the source database.
- *
- * Generated from protobuf field string source_database = 3 [deprecated = true];
- * @return string
- * @deprecated
- */
- public function getSourceDatabase()
- {
- @trigger_error('source_database is deprecated.', E_USER_DEPRECATED);
- return $this->source_database;
- }
-
- /**
- * The name of the source database.
- *
- * Generated from protobuf field string source_database = 3 [deprecated = true];
- * @param string $var
- * @return $this
- * @deprecated
- */
- public function setSourceDatabase($var)
- {
- @trigger_error('source_database is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkString($var, True);
- $this->source_database = $var;
-
- return $this;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\DatabaseDumpSpec\Type::class);
- $this->type = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/DataprocMetastore/src/V1alpha/MetadataImport/DatabaseDump/DatabaseType.php b/DataprocMetastore/src/V1alpha/MetadataImport/DatabaseDump/DatabaseType.php
deleted file mode 100644
index d4726efbb67b..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataImport/DatabaseDump/DatabaseType.php
+++ /dev/null
@@ -1,55 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataImport.DatabaseDump.DatabaseType
- */
-class DatabaseType
-{
- /**
- * The type of the source database is unknown.
- *
- * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0;
- */
- const DATABASE_TYPE_UNSPECIFIED = 0;
- /**
- * The type of the source database is MySQL.
- *
- * Generated from protobuf enum MYSQL = 1;
- */
- const MYSQL = 1;
-
- private static $valueToName = [
- self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED',
- self::MYSQL => 'MYSQL',
- ];
-
- 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/DataprocMetastore/src/V1alpha/MetadataImport/State.php b/DataprocMetastore/src/V1alpha/MetadataImport/State.php
deleted file mode 100644
index 8748c5e5c37c..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataImport/State.php
+++ /dev/null
@@ -1,77 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataImport.State
- */
-class State
-{
- /**
- * The state of the metadata import is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metadata import is running.
- *
- * Generated from protobuf enum RUNNING = 1;
- */
- const RUNNING = 1;
- /**
- * The metadata import completed successfully.
- *
- * Generated from protobuf enum SUCCEEDED = 2;
- */
- const SUCCEEDED = 2;
- /**
- * The metadata import is being updated.
- *
- * Generated from protobuf enum UPDATING = 3;
- */
- const UPDATING = 3;
- /**
- * The metadata import failed, and attempted metadata changes were rolled
- * back.
- *
- * Generated from protobuf enum FAILED = 4;
- */
- const FAILED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::RUNNING => 'RUNNING',
- self::SUCCEEDED => 'SUCCEEDED',
- self::UPDATING => 'UPDATING',
- self::FAILED => 'FAILED',
- ];
-
- 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/DataprocMetastore/src/V1alpha/MetadataIntegration.php b/DataprocMetastore/src/V1alpha/MetadataIntegration.php
deleted file mode 100644
index ce0e30f64827..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataIntegration.php
+++ /dev/null
@@ -1,121 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataIntegration
- */
-class MetadataIntegration extends \Google\Protobuf\Internal\Message
-{
- /**
- * The integration config for the Data Catalog service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1;
- */
- protected $data_catalog_config = null;
- /**
- * The integration config for the Dataplex service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2;
- */
- protected $dataplex_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1alpha\DataCatalogConfig $data_catalog_config
- * The integration config for the Data Catalog service.
- * @type \Google\Cloud\Metastore\V1alpha\DataplexConfig $dataplex_config
- * The integration config for the Dataplex service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The integration config for the Data Catalog service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1;
- * @return \Google\Cloud\Metastore\V1alpha\DataCatalogConfig|null
- */
- public function getDataCatalogConfig()
- {
- return $this->data_catalog_config;
- }
-
- public function hasDataCatalogConfig()
- {
- return isset($this->data_catalog_config);
- }
-
- public function clearDataCatalogConfig()
- {
- unset($this->data_catalog_config);
- }
-
- /**
- * The integration config for the Data Catalog service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DataCatalogConfig data_catalog_config = 1;
- * @param \Google\Cloud\Metastore\V1alpha\DataCatalogConfig $var
- * @return $this
- */
- public function setDataCatalogConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\DataCatalogConfig::class);
- $this->data_catalog_config = $var;
-
- return $this;
- }
-
- /**
- * The integration config for the Dataplex service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2;
- * @return \Google\Cloud\Metastore\V1alpha\DataplexConfig|null
- */
- public function getDataplexConfig()
- {
- return $this->dataplex_config;
- }
-
- public function hasDataplexConfig()
- {
- return isset($this->dataplex_config);
- }
-
- public function clearDataplexConfig()
- {
- unset($this->dataplex_config);
- }
-
- /**
- * The integration config for the Dataplex service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.DataplexConfig dataplex_config = 2;
- * @param \Google\Cloud\Metastore\V1alpha\DataplexConfig $var
- * @return $this
- */
- public function setDataplexConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\DataplexConfig::class);
- $this->dataplex_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/MetadataManagementActivity.php b/DataprocMetastore/src/V1alpha/MetadataManagementActivity.php
deleted file mode 100644
index 3af658f899ef..000000000000
--- a/DataprocMetastore/src/V1alpha/MetadataManagementActivity.php
+++ /dev/null
@@ -1,101 +0,0 @@
-google.cloud.metastore.v1alpha.MetadataManagementActivity
- */
-class MetadataManagementActivity extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The latest metadata exports of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $metadata_exports;
- /**
- * Output only. The latest restores of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $restores;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\MetadataExport>|\Google\Protobuf\Internal\RepeatedField $metadata_exports
- * Output only. The latest metadata exports of the metastore service.
- * @type array<\Google\Cloud\Metastore\V1alpha\Restore>|\Google\Protobuf\Internal\RepeatedField $restores
- * Output only. The latest restores of the metastore service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The latest metadata exports of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetadataExports()
- {
- return $this->metadata_exports;
- }
-
- /**
- * Output only. The latest metadata exports of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param array<\Google\Cloud\Metastore\V1alpha\MetadataExport>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetadataExports($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\MetadataExport::class);
- $this->metadata_exports = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The latest restores of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRestores()
- {
- return $this->restores;
- }
-
- /**
- * Output only. The latest restores of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param array<\Google\Cloud\Metastore\V1alpha\Restore>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRestores($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\Restore::class);
- $this->restores = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/MoveTableToDatabaseRequest.php b/DataprocMetastore/src/V1alpha/MoveTableToDatabaseRequest.php
deleted file mode 100644
index 144a2f02226b..000000000000
--- a/DataprocMetastore/src/V1alpha/MoveTableToDatabaseRequest.php
+++ /dev/null
@@ -1,178 +0,0 @@
-google.cloud.metastore.v1alpha.MoveTableToDatabaseRequest
- */
-class MoveTableToDatabaseRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. The name of the table to be moved.
- *
- * Generated from protobuf field string table_name = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $table_name = '';
- /**
- * Required. The name of the database where the table resides.
- *
- * Generated from protobuf field string db_name = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $db_name = '';
- /**
- * Required. The name of the database where the table should be moved.
- *
- * Generated from protobuf field string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $destination_db_name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $table_name
- * Required. The name of the table to be moved.
- * @type string $db_name
- * Required. The name of the database where the table resides.
- * @type string $destination_db_name
- * Required. The name of the database where the table should be moved.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the table to be moved.
- *
- * Generated from protobuf field string table_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getTableName()
- {
- return $this->table_name;
- }
-
- /**
- * Required. The name of the table to be moved.
- *
- * Generated from protobuf field string table_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setTableName($var)
- {
- GPBUtil::checkString($var, True);
- $this->table_name = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the database where the table resides.
- *
- * Generated from protobuf field string db_name = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getDbName()
- {
- return $this->db_name;
- }
-
- /**
- * Required. The name of the database where the table resides.
- *
- * Generated from protobuf field string db_name = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setDbName($var)
- {
- GPBUtil::checkString($var, True);
- $this->db_name = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the database where the table should be moved.
- *
- * Generated from protobuf field string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getDestinationDbName()
- {
- return $this->destination_db_name;
- }
-
- /**
- * Required. The name of the database where the table should be moved.
- *
- * Generated from protobuf field string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setDestinationDbName($var)
- {
- GPBUtil::checkString($var, True);
- $this->destination_db_name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/MoveTableToDatabaseResponse.php b/DataprocMetastore/src/V1alpha/MoveTableToDatabaseResponse.php
deleted file mode 100644
index de287eda072c..000000000000
--- a/DataprocMetastore/src/V1alpha/MoveTableToDatabaseResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.cloud.metastore.v1alpha.MoveTableToDatabaseResponse
- */
-class MoveTableToDatabaseResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/NetworkConfig.php b/DataprocMetastore/src/V1alpha/NetworkConfig.php
deleted file mode 100644
index 4a06cc15ec6b..000000000000
--- a/DataprocMetastore/src/V1alpha/NetworkConfig.php
+++ /dev/null
@@ -1,110 +0,0 @@
-google.cloud.metastore.v1alpha.NetworkConfig
- */
-class NetworkConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- private $consumers;
- /**
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- *
- * Generated from protobuf field bool custom_routes_enabled = 2;
- */
- protected $custom_routes_enabled = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1alpha\NetworkConfig\Consumer>|\Google\Protobuf\Internal\RepeatedField $consumers
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- * @type bool $custom_routes_enabled
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getConsumers()
- {
- return $this->consumers;
- }
-
- /**
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1alpha.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param array<\Google\Cloud\Metastore\V1alpha\NetworkConfig\Consumer>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setConsumers($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1alpha\NetworkConfig\Consumer::class);
- $this->consumers = $arr;
-
- return $this;
- }
-
- /**
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- *
- * Generated from protobuf field bool custom_routes_enabled = 2;
- * @return bool
- */
- public function getCustomRoutesEnabled()
- {
- return $this->custom_routes_enabled;
- }
-
- /**
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- *
- * Generated from protobuf field bool custom_routes_enabled = 2;
- * @param bool $var
- * @return $this
- */
- public function setCustomRoutesEnabled($var)
- {
- GPBUtil::checkBool($var);
- $this->custom_routes_enabled = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/NetworkConfig/Consumer.php b/DataprocMetastore/src/V1alpha/NetworkConfig/Consumer.php
deleted file mode 100644
index ebce9de78c7a..000000000000
--- a/DataprocMetastore/src/V1alpha/NetworkConfig/Consumer.php
+++ /dev/null
@@ -1,171 +0,0 @@
-google.cloud.metastore.v1alpha.NetworkConfig.Consumer
- */
-class Consumer extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- *
- * Generated from protobuf field string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $endpoint_uri = '';
- /**
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string endpoint_location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $endpoint_location = '';
- protected $vpc_resource;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subnetwork
- * Immutable. The subnetwork of the customer project from which an IP
- * address is reserved and used as the Dataproc Metastore service's
- * endpoint. It is accessible to hosts in the subnet and to all
- * hosts in a subnet in the same region and same network. There must
- * be at least one IP address available in the subnet's primary range. The
- * subnet is specified in the following form:
- * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
- * @type string $endpoint_uri
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- * @type string $endpoint_location
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The subnetwork of the customer project from which an IP
- * address is reserved and used as the Dataproc Metastore service's
- * endpoint. It is accessible to hosts in the subnet and to all
- * hosts in a subnet in the same region and same network. There must
- * be at least one IP address available in the subnet's primary range. The
- * subnet is specified in the following form:
- * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubnetwork()
- {
- return $this->readOneof(1);
- }
-
- public function hasSubnetwork()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Immutable. The subnetwork of the customer project from which an IP
- * address is reserved and used as the Dataproc Metastore service's
- * endpoint. It is accessible to hosts in the subnet and to all
- * hosts in a subnet in the same region and same network. There must
- * be at least one IP address available in the subnet's primary range. The
- * subnet is specified in the following form:
- * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubnetwork($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- *
- * Generated from protobuf field string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEndpointUri()
- {
- return $this->endpoint_uri;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- *
- * Generated from protobuf field string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEndpointUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_uri = $var;
-
- return $this;
- }
-
- /**
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string endpoint_location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getEndpointLocation()
- {
- return $this->endpoint_location;
- }
-
- /**
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string endpoint_location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setEndpointLocation($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_location = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getVpcResource()
- {
- return $this->whichOneof("vpc_resource");
- }
-
-}
-
-
diff --git a/DataprocMetastore/src/V1alpha/OperationMetadata.php b/DataprocMetastore/src/V1alpha/OperationMetadata.php
deleted file mode 100644
index e53f8d4788bd..000000000000
--- a/DataprocMetastore/src/V1alpha/OperationMetadata.php
+++ /dev/null
@@ -1,307 +0,0 @@
-google.cloud.metastore.v1alpha.OperationMetadata
- */
-class OperationMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $target = '';
- /**
- * Output only. Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $verb = '';
- /**
- * Output only. Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $status_message = '';
- /**
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- *
- * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $requested_cancellation = false;
- /**
- * Output only. API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $api_version = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time the operation was created.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time the operation finished running.
- * @type string $target
- * Output only. Server-defined resource path for the target of the operation.
- * @type string $verb
- * Output only. Name of the verb executed by the operation.
- * @type string $status_message
- * Output only. Human-readable status of the operation, if any.
- * @type bool $requested_cancellation
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- * @type string $api_version
- * Output only. API version used to start the operation.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getTarget()
- {
- return $this->target;
- }
-
- /**
- * Output only. Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setTarget($var)
- {
- GPBUtil::checkString($var, True);
- $this->target = $var;
-
- return $this;
- }
-
- /**
- * Output only. Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getVerb()
- {
- return $this->verb;
- }
-
- /**
- * Output only. Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setVerb($var)
- {
- GPBUtil::checkString($var, True);
- $this->verb = $var;
-
- return $this;
- }
-
- /**
- * Output only. Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getStatusMessage()
- {
- return $this->status_message;
- }
-
- /**
- * Output only. Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setStatusMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->status_message = $var;
-
- return $this;
- }
-
- /**
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- *
- * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return bool
- */
- public function getRequestedCancellation()
- {
- return $this->requested_cancellation;
- }
-
- /**
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- *
- * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param bool $var
- * @return $this
- */
- public function setRequestedCancellation($var)
- {
- GPBUtil::checkBool($var);
- $this->requested_cancellation = $var;
-
- return $this;
- }
-
- /**
- * Output only. API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getApiVersion()
- {
- return $this->api_version;
- }
-
- /**
- * Output only. API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setApiVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->api_version = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/QueryMetadataRequest.php b/DataprocMetastore/src/V1alpha/QueryMetadataRequest.php
deleted file mode 100644
index 7311145db977..000000000000
--- a/DataprocMetastore/src/V1alpha/QueryMetadataRequest.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.metastore.v1alpha.QueryMetadataRequest
- */
-class QueryMetadataRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- *
- * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $query = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $query
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- *
- * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getQuery()
- {
- return $this->query;
- }
-
- /**
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- *
- * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setQuery($var)
- {
- GPBUtil::checkString($var, True);
- $this->query = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/QueryMetadataResponse.php b/DataprocMetastore/src/V1alpha/QueryMetadataResponse.php
deleted file mode 100644
index f281f4e03016..000000000000
--- a/DataprocMetastore/src/V1alpha/QueryMetadataResponse.php
+++ /dev/null
@@ -1,80 +0,0 @@
-google.cloud.metastore.v1alpha.QueryMetadataResponse
- */
-class QueryMetadataResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- *
- * Generated from protobuf field string result_manifest_uri = 1;
- */
- protected $result_manifest_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $result_manifest_uri
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- *
- * Generated from protobuf field string result_manifest_uri = 1;
- * @return string
- */
- public function getResultManifestUri()
- {
- return $this->result_manifest_uri;
- }
-
- /**
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- *
- * Generated from protobuf field string result_manifest_uri = 1;
- * @param string $var
- * @return $this
- */
- public function setResultManifestUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->result_manifest_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/RemoveIamPolicyRequest.php b/DataprocMetastore/src/V1alpha/RemoveIamPolicyRequest.php
deleted file mode 100644
index bb2ac3296f27..000000000000
--- a/DataprocMetastore/src/V1alpha/RemoveIamPolicyRequest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-google.cloud.metastore.v1alpha.RemoveIamPolicyRequest
- */
-class RemoveIamPolicyRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- *
- * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $resource = '';
- /**
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- *
- * Generated from protobuf field bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $asynchronous = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $resource
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- * @type bool $asynchronous
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- *
- * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- *
- * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setResource($var)
- {
- GPBUtil::checkString($var, True);
- $this->resource = $var;
-
- return $this;
- }
-
- /**
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- *
- * Generated from protobuf field bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return bool
- */
- public function getAsynchronous()
- {
- return $this->asynchronous;
- }
-
- /**
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- *
- * Generated from protobuf field bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param bool $var
- * @return $this
- */
- public function setAsynchronous($var)
- {
- GPBUtil::checkBool($var);
- $this->asynchronous = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/RemoveIamPolicyResponse.php b/DataprocMetastore/src/V1alpha/RemoveIamPolicyResponse.php
deleted file mode 100644
index d67408b39be9..000000000000
--- a/DataprocMetastore/src/V1alpha/RemoveIamPolicyResponse.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.metastore.v1alpha.RemoveIamPolicyResponse
- */
-class RemoveIamPolicyResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * True if the policy is successfully removed.
- *
- * Generated from protobuf field bool success = 1;
- */
- protected $success = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $success
- * True if the policy is successfully removed.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * True if the policy is successfully removed.
- *
- * Generated from protobuf field bool success = 1;
- * @return bool
- */
- public function getSuccess()
- {
- return $this->success;
- }
-
- /**
- * True if the policy is successfully removed.
- *
- * Generated from protobuf field bool success = 1;
- * @param bool $var
- * @return $this
- */
- public function setSuccess($var)
- {
- GPBUtil::checkBool($var);
- $this->success = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Restore.php b/DataprocMetastore/src/V1alpha/Restore.php
deleted file mode 100644
index 808a5b15a5b4..000000000000
--- a/DataprocMetastore/src/V1alpha/Restore.php
+++ /dev/null
@@ -1,269 +0,0 @@
-google.cloud.metastore.v1alpha.Restore
- */
-class Restore extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The time when the restore started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $start_time = null;
- /**
- * Output only. The time when the restore ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $backup = '';
- /**
- * Output only. The type of restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $type = 0;
- /**
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- *
- * Generated from protobuf field string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $details = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Timestamp $start_time
- * Output only. The time when the restore started.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the restore ended.
- * @type int $state
- * Output only. The current state of the restore.
- * @type string $backup
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @type int $type
- * Output only. The type of restore.
- * @type string $details
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The time when the restore started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Output only. The time when the restore started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the restore ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the restore ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Restore\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getBackup()
- {
- return $this->backup;
- }
-
- /**
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setBackup($var)
- {
- GPBUtil::checkString($var, True);
- $this->backup = $var;
-
- return $this;
- }
-
- /**
- * Output only. The type of restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Output only. The type of restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Restore\RestoreType::class);
- $this->type = $var;
-
- return $this;
- }
-
- /**
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- *
- * Generated from protobuf field string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getDetails()
- {
- return $this->details;
- }
-
- /**
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- *
- * Generated from protobuf field string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setDetails($var)
- {
- GPBUtil::checkString($var, True);
- $this->details = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Restore/RestoreType.php b/DataprocMetastore/src/V1alpha/Restore/RestoreType.php
deleted file mode 100644
index 215462123f01..000000000000
--- a/DataprocMetastore/src/V1alpha/Restore/RestoreType.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1alpha.Restore.RestoreType
- */
-class RestoreType
-{
- /**
- * The restore type is unknown.
- *
- * Generated from protobuf enum RESTORE_TYPE_UNSPECIFIED = 0;
- */
- const RESTORE_TYPE_UNSPECIFIED = 0;
- /**
- * The service's metadata and configuration are restored.
- *
- * Generated from protobuf enum FULL = 1;
- */
- const FULL = 1;
- /**
- * Only the service's metadata is restored.
- *
- * Generated from protobuf enum METADATA_ONLY = 2;
- */
- const METADATA_ONLY = 2;
-
- private static $valueToName = [
- self::RESTORE_TYPE_UNSPECIFIED => 'RESTORE_TYPE_UNSPECIFIED',
- self::FULL => 'FULL',
- self::METADATA_ONLY => 'METADATA_ONLY',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Restore/State.php b/DataprocMetastore/src/V1alpha/Restore/State.php
deleted file mode 100644
index 9c1806cc3c5d..000000000000
--- a/DataprocMetastore/src/V1alpha/Restore/State.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1alpha.Restore.State
- */
-class State
-{
- /**
- * The state of the metadata restore is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metadata restore is running.
- *
- * Generated from protobuf enum RUNNING = 1;
- */
- const RUNNING = 1;
- /**
- * The metadata restore completed successfully.
- *
- * Generated from protobuf enum SUCCEEDED = 2;
- */
- const SUCCEEDED = 2;
- /**
- * The metadata restore failed.
- *
- * Generated from protobuf enum FAILED = 3;
- */
- const FAILED = 3;
- /**
- * The metadata restore is cancelled.
- *
- * Generated from protobuf enum CANCELLED = 4;
- */
- const CANCELLED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::RUNNING => 'RUNNING',
- self::SUCCEEDED => 'SUCCEEDED',
- self::FAILED => 'FAILED',
- self::CANCELLED => 'CANCELLED',
- ];
-
- 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/DataprocMetastore/src/V1alpha/RestoreServiceRequest.php b/DataprocMetastore/src/V1alpha/RestoreServiceRequest.php
deleted file mode 100644
index 173c80bdc5ff..000000000000
--- a/DataprocMetastore/src/V1alpha/RestoreServiceRequest.php
+++ /dev/null
@@ -1,221 +0,0 @@
-google.cloud.metastore.v1alpha.RestoreServiceRequest
- */
-class RestoreServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $backup = '';
- /**
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $restore_type = 0;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $backup
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @type int $restore_type
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getBackup()
- {
- return $this->backup;
- }
-
- /**
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setBackup($var)
- {
- GPBUtil::checkString($var, True);
- $this->backup = $var;
-
- return $this;
- }
-
- /**
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getRestoreType()
- {
- return $this->restore_type;
- }
-
- /**
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setRestoreType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Restore\RestoreType::class);
- $this->restore_type = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ScalingConfig.php b/DataprocMetastore/src/V1alpha/ScalingConfig.php
deleted file mode 100644
index 1807bfee9f04..000000000000
--- a/DataprocMetastore/src/V1alpha/ScalingConfig.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.metastore.v1alpha.ScalingConfig
- */
-class ScalingConfig extends \Google\Protobuf\Internal\Message
-{
- protected $scaling_model;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $instance_size
- * An enum of readable instance sizes, with each instance size mapping to a
- * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
- * @type float $scaling_factor
- * Scaling factor, increments of 0.1 for values less than 1.0, and
- * increments of 1.0 for values greater than 1.0.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * An enum of readable instance sizes, with each instance size mapping to a
- * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1;
- * @return int
- */
- public function getInstanceSize()
- {
- return $this->readOneof(1);
- }
-
- public function hasInstanceSize()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * An enum of readable instance sizes, with each instance size mapping to a
- * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize instance_size = 1;
- * @param int $var
- * @return $this
- */
- public function setInstanceSize($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\ScalingConfig\InstanceSize::class);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * Scaling factor, increments of 0.1 for values less than 1.0, and
- * increments of 1.0 for values greater than 1.0.
- *
- * Generated from protobuf field float scaling_factor = 2;
- * @return float
- */
- public function getScalingFactor()
- {
- return $this->readOneof(2);
- }
-
- public function hasScalingFactor()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * Scaling factor, increments of 0.1 for values less than 1.0, and
- * increments of 1.0 for values greater than 1.0.
- *
- * Generated from protobuf field float scaling_factor = 2;
- * @param float $var
- * @return $this
- */
- public function setScalingFactor($var)
- {
- GPBUtil::checkFloat($var);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getScalingModel()
- {
- return $this->whichOneof("scaling_model");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/ScalingConfig/InstanceSize.php b/DataprocMetastore/src/V1alpha/ScalingConfig/InstanceSize.php
deleted file mode 100644
index aa46f12fe7be..000000000000
--- a/DataprocMetastore/src/V1alpha/ScalingConfig/InstanceSize.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.cloud.metastore.v1alpha.ScalingConfig.InstanceSize
- */
-class InstanceSize
-{
- /**
- * Unspecified instance size
- *
- * Generated from protobuf enum INSTANCE_SIZE_UNSPECIFIED = 0;
- */
- const INSTANCE_SIZE_UNSPECIFIED = 0;
- /**
- * Extra small instance size, maps to a scaling factor of 0.1.
- *
- * Generated from protobuf enum EXTRA_SMALL = 1;
- */
- const EXTRA_SMALL = 1;
- /**
- * Small instance size, maps to a scaling factor of 0.5.
- *
- * Generated from protobuf enum SMALL = 2;
- */
- const SMALL = 2;
- /**
- * Medium instance size, maps to a scaling factor of 1.0.
- *
- * Generated from protobuf enum MEDIUM = 3;
- */
- const MEDIUM = 3;
- /**
- * Large instance size, maps to a scaling factor of 3.0.
- *
- * Generated from protobuf enum LARGE = 4;
- */
- const LARGE = 4;
- /**
- * Extra large instance size, maps to a scaling factor of 6.0.
- *
- * Generated from protobuf enum EXTRA_LARGE = 5;
- */
- const EXTRA_LARGE = 5;
-
- private static $valueToName = [
- self::INSTANCE_SIZE_UNSPECIFIED => 'INSTANCE_SIZE_UNSPECIFIED',
- self::EXTRA_SMALL => 'EXTRA_SMALL',
- self::SMALL => 'SMALL',
- self::MEDIUM => 'MEDIUM',
- self::LARGE => 'LARGE',
- self::EXTRA_LARGE => 'EXTRA_LARGE',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Secret.php b/DataprocMetastore/src/V1alpha/Secret.php
deleted file mode 100644
index 307c8b688384..000000000000
--- a/DataprocMetastore/src/V1alpha/Secret.php
+++ /dev/null
@@ -1,81 +0,0 @@
-google.cloud.metastore.v1alpha.Secret
- */
-class Secret extends \Google\Protobuf\Internal\Message
-{
- protected $value;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $cloud_secret
- * The relative resource name of a Secret Manager secret version, in the
- * following form:
- * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The relative resource name of a Secret Manager secret version, in the
- * following form:
- * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
- *
- * Generated from protobuf field string cloud_secret = 2;
- * @return string
- */
- public function getCloudSecret()
- {
- return $this->readOneof(2);
- }
-
- public function hasCloudSecret()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * The relative resource name of a Secret Manager secret version, in the
- * following form:
- * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
- *
- * Generated from protobuf field string cloud_secret = 2;
- * @param string $var
- * @return $this
- */
- public function setCloudSecret($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getValue()
- {
- return $this->whichOneof("value");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Service.php b/DataprocMetastore/src/V1alpha/Service.php
deleted file mode 100644
index 7efbade698c0..000000000000
--- a/DataprocMetastore/src/V1alpha/Service.php
+++ /dev/null
@@ -1,942 +0,0 @@
-google.cloud.metastore.v1alpha.Service
- */
-class Service extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * Output only. The time when the metastore service was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the metastore service was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * User-defined labels for the metastore service.
- *
- * Generated from protobuf field map labels = 4;
- */
- private $labels;
- /**
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- *
- * Generated from protobuf field string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- */
- protected $network = '';
- /**
- * Output only. The URI of the endpoint used to access the metastore service.
- *
- * Generated from protobuf field string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $endpoint_uri = '';
- /**
- * The TCP port at which the metastore service is reached. Default: 9083.
- *
- * Generated from protobuf field int32 port = 9;
- */
- protected $port = 0;
- /**
- * Output only. The current state of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- *
- * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state_message = '';
- /**
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- *
- * Generated from protobuf field string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $artifact_gcs_uri = '';
- /**
- * The tier of the service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.Tier tier = 13;
- */
- protected $tier = 0;
- /**
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14;
- */
- protected $metadata_integration = null;
- /**
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15;
- */
- protected $maintenance_window = null;
- /**
- * Output only. The globally unique resource identifier of the metastore
- * service.
- *
- * Generated from protobuf field string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
- /**
- * Output only. The metadata management activities of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $metadata_management_activity = null;
- /**
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $release_channel = 0;
- /**
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $encryption_config = null;
- /**
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21;
- */
- protected $network_config = null;
- /**
- * Immutable. The database type that the Metastore service stores its data.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $database_type = 0;
- /**
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23;
- */
- protected $telemetry_config = null;
- /**
- * Scaling configuration of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24;
- */
- protected $scaling_config = null;
- protected $metastore_config;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1alpha\HiveMetastoreConfig $hive_metastore_config
- * Configuration information specific to running Hive metastore
- * software as the metastore service.
- * @type string $name
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the metastore service was created.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The time when the metastore service was last updated.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * User-defined labels for the metastore service.
- * @type string $network
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- * @type string $endpoint_uri
- * Output only. The URI of the endpoint used to access the metastore service.
- * @type int $port
- * The TCP port at which the metastore service is reached. Default: 9083.
- * @type int $state
- * Output only. The current state of the metastore service.
- * @type string $state_message
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- * @type string $artifact_gcs_uri
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- * @type int $tier
- * The tier of the service.
- * @type \Google\Cloud\Metastore\V1alpha\MetadataIntegration $metadata_integration
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- * @type \Google\Cloud\Metastore\V1alpha\MaintenanceWindow $maintenance_window
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- * @type string $uid
- * Output only. The globally unique resource identifier of the metastore
- * service.
- * @type \Google\Cloud\Metastore\V1alpha\MetadataManagementActivity $metadata_management_activity
- * Output only. The metadata management activities of the metastore service.
- * @type int $release_channel
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- * @type \Google\Cloud\Metastore\V1alpha\EncryptionConfig $encryption_config
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- * @type \Google\Cloud\Metastore\V1alpha\NetworkConfig $network_config
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- * @type int $database_type
- * Immutable. The database type that the Metastore service stores its data.
- * @type \Google\Cloud\Metastore\V1alpha\TelemetryConfig $telemetry_config
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- * @type \Google\Cloud\Metastore\V1alpha\ScalingConfig $scaling_config
- * Scaling configuration of the metastore service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Configuration information specific to running Hive metastore
- * software as the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5;
- * @return \Google\Cloud\Metastore\V1alpha\HiveMetastoreConfig|null
- */
- public function getHiveMetastoreConfig()
- {
- return $this->readOneof(5);
- }
-
- public function hasHiveMetastoreConfig()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * Configuration information specific to running Hive metastore
- * software as the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.HiveMetastoreConfig hive_metastore_config = 5;
- * @param \Google\Cloud\Metastore\V1alpha\HiveMetastoreConfig $var
- * @return $this
- */
- public function setHiveMetastoreConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\HiveMetastoreConfig::class);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore service was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the metastore service was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore service was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The time when the metastore service was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * User-defined labels for the metastore service.
- *
- * Generated from protobuf field map labels = 4;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * User-defined labels for the metastore service.
- *
- * Generated from protobuf field map labels = 4;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
-
- return $this;
- }
-
- /**
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- *
- * Generated from protobuf field string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @return string
- */
- public function getNetwork()
- {
- return $this->network;
- }
-
- /**
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- *
- * Generated from protobuf field string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setNetwork($var)
- {
- GPBUtil::checkString($var, True);
- $this->network = $var;
-
- return $this;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore service.
- *
- * Generated from protobuf field string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEndpointUri()
- {
- return $this->endpoint_uri;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore service.
- *
- * Generated from protobuf field string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEndpointUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_uri = $var;
-
- return $this;
- }
-
- /**
- * The TCP port at which the metastore service is reached. Default: 9083.
- *
- * Generated from protobuf field int32 port = 9;
- * @return int
- */
- public function getPort()
- {
- return $this->port;
- }
-
- /**
- * The TCP port at which the metastore service is reached. Default: 9083.
- *
- * Generated from protobuf field int32 port = 9;
- * @param int $var
- * @return $this
- */
- public function setPort($var)
- {
- GPBUtil::checkInt32($var);
- $this->port = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Service\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- *
- * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getStateMessage()
- {
- return $this->state_message;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- *
- * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setStateMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->state_message = $var;
-
- return $this;
- }
-
- /**
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- *
- * Generated from protobuf field string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getArtifactGcsUri()
- {
- return $this->artifact_gcs_uri;
- }
-
- /**
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- *
- * Generated from protobuf field string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setArtifactGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->artifact_gcs_uri = $var;
-
- return $this;
- }
-
- /**
- * The tier of the service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.Tier tier = 13;
- * @return int
- */
- public function getTier()
- {
- return $this->tier;
- }
-
- /**
- * The tier of the service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.Tier tier = 13;
- * @param int $var
- * @return $this
- */
- public function setTier($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Service\Tier::class);
- $this->tier = $var;
-
- return $this;
- }
-
- /**
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14;
- * @return \Google\Cloud\Metastore\V1alpha\MetadataIntegration|null
- */
- public function getMetadataIntegration()
- {
- return $this->metadata_integration;
- }
-
- public function hasMetadataIntegration()
- {
- return isset($this->metadata_integration);
- }
-
- public function clearMetadataIntegration()
- {
- unset($this->metadata_integration);
- }
-
- /**
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataIntegration metadata_integration = 14;
- * @param \Google\Cloud\Metastore\V1alpha\MetadataIntegration $var
- * @return $this
- */
- public function setMetadataIntegration($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\MetadataIntegration::class);
- $this->metadata_integration = $var;
-
- return $this;
- }
-
- /**
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15;
- * @return \Google\Cloud\Metastore\V1alpha\MaintenanceWindow|null
- */
- public function getMaintenanceWindow()
- {
- return $this->maintenance_window;
- }
-
- public function hasMaintenanceWindow()
- {
- return isset($this->maintenance_window);
- }
-
- public function clearMaintenanceWindow()
- {
- unset($this->maintenance_window);
- }
-
- /**
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MaintenanceWindow maintenance_window = 15;
- * @param \Google\Cloud\Metastore\V1alpha\MaintenanceWindow $var
- * @return $this
- */
- public function setMaintenanceWindow($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\MaintenanceWindow::class);
- $this->maintenance_window = $var;
-
- return $this;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * service.
- *
- * Generated from protobuf field string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * service.
- *
- * Generated from protobuf field string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
- /**
- * Output only. The metadata management activities of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Metastore\V1alpha\MetadataManagementActivity|null
- */
- public function getMetadataManagementActivity()
- {
- return $this->metadata_management_activity;
- }
-
- public function hasMetadataManagementActivity()
- {
- return isset($this->metadata_management_activity);
- }
-
- public function clearMetadataManagementActivity()
- {
- unset($this->metadata_management_activity);
- }
-
- /**
- * Output only. The metadata management activities of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Metastore\V1alpha\MetadataManagementActivity $var
- * @return $this
- */
- public function setMetadataManagementActivity($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\MetadataManagementActivity::class);
- $this->metadata_management_activity = $var;
-
- return $this;
- }
-
- /**
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE];
- * @return int
- */
- public function getReleaseChannel()
- {
- return $this->release_channel;
- }
-
- /**
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE];
- * @param int $var
- * @return $this
- */
- public function setReleaseChannel($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Service\ReleaseChannel::class);
- $this->release_channel = $var;
-
- return $this;
- }
-
- /**
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE];
- * @return \Google\Cloud\Metastore\V1alpha\EncryptionConfig|null
- */
- public function getEncryptionConfig()
- {
- return $this->encryption_config;
- }
-
- public function hasEncryptionConfig()
- {
- return isset($this->encryption_config);
- }
-
- public function clearEncryptionConfig()
- {
- unset($this->encryption_config);
- }
-
- /**
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE];
- * @param \Google\Cloud\Metastore\V1alpha\EncryptionConfig $var
- * @return $this
- */
- public function setEncryptionConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\EncryptionConfig::class);
- $this->encryption_config = $var;
-
- return $this;
- }
-
- /**
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21;
- * @return \Google\Cloud\Metastore\V1alpha\NetworkConfig|null
- */
- public function getNetworkConfig()
- {
- return $this->network_config;
- }
-
- public function hasNetworkConfig()
- {
- return isset($this->network_config);
- }
-
- public function clearNetworkConfig()
- {
- unset($this->network_config);
- }
-
- /**
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.NetworkConfig network_config = 21;
- * @param \Google\Cloud\Metastore\V1alpha\NetworkConfig $var
- * @return $this
- */
- public function setNetworkConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\NetworkConfig::class);
- $this->network_config = $var;
-
- return $this;
- }
-
- /**
- * Immutable. The database type that the Metastore service stores its data.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE];
- * @return int
- */
- public function getDatabaseType()
- {
- return $this->database_type;
- }
-
- /**
- * Immutable. The database type that the Metastore service stores its data.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE];
- * @param int $var
- * @return $this
- */
- public function setDatabaseType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\Service\DatabaseType::class);
- $this->database_type = $var;
-
- return $this;
- }
-
- /**
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23;
- * @return \Google\Cloud\Metastore\V1alpha\TelemetryConfig|null
- */
- public function getTelemetryConfig()
- {
- return $this->telemetry_config;
- }
-
- public function hasTelemetryConfig()
- {
- return isset($this->telemetry_config);
- }
-
- public function clearTelemetryConfig()
- {
- unset($this->telemetry_config);
- }
-
- /**
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.TelemetryConfig telemetry_config = 23;
- * @param \Google\Cloud\Metastore\V1alpha\TelemetryConfig $var
- * @return $this
- */
- public function setTelemetryConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\TelemetryConfig::class);
- $this->telemetry_config = $var;
-
- return $this;
- }
-
- /**
- * Scaling configuration of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24;
- * @return \Google\Cloud\Metastore\V1alpha\ScalingConfig|null
- */
- public function getScalingConfig()
- {
- return $this->scaling_config;
- }
-
- public function hasScalingConfig()
- {
- return isset($this->scaling_config);
- }
-
- public function clearScalingConfig()
- {
- unset($this->scaling_config);
- }
-
- /**
- * Scaling configuration of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.ScalingConfig scaling_config = 24;
- * @param \Google\Cloud\Metastore\V1alpha\ScalingConfig $var
- * @return $this
- */
- public function setScalingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\ScalingConfig::class);
- $this->scaling_config = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getMetastoreConfig()
- {
- return $this->whichOneof("metastore_config");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/Service/DatabaseType.php b/DataprocMetastore/src/V1alpha/Service/DatabaseType.php
deleted file mode 100644
index 705625b9b1d6..000000000000
--- a/DataprocMetastore/src/V1alpha/Service/DatabaseType.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1alpha.Service.DatabaseType
- */
-class DatabaseType
-{
- /**
- * The DATABASE_TYPE is not set.
- *
- * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0;
- */
- const DATABASE_TYPE_UNSPECIFIED = 0;
- /**
- * MySQL is used to persist the metastore data.
- *
- * Generated from protobuf enum MYSQL = 1;
- */
- const MYSQL = 1;
- /**
- * Spanner is used to persist the metastore data.
- *
- * Generated from protobuf enum SPANNER = 2;
- */
- const SPANNER = 2;
-
- private static $valueToName = [
- self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED',
- self::MYSQL => 'MYSQL',
- self::SPANNER => 'SPANNER',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Service/ReleaseChannel.php b/DataprocMetastore/src/V1alpha/Service/ReleaseChannel.php
deleted file mode 100644
index e65d9cbda2e0..000000000000
--- a/DataprocMetastore/src/V1alpha/Service/ReleaseChannel.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.cloud.metastore.v1alpha.Service.ReleaseChannel
- */
-class ReleaseChannel
-{
- /**
- * Release channel is not specified.
- *
- * Generated from protobuf enum RELEASE_CHANNEL_UNSPECIFIED = 0;
- */
- const RELEASE_CHANNEL_UNSPECIFIED = 0;
- /**
- * The `CANARY` release channel contains the newest features, which may be
- * unstable and subject to unresolved issues with no known workarounds.
- * Services using the `CANARY` release channel are not subject to any SLAs.
- *
- * Generated from protobuf enum CANARY = 1;
- */
- const CANARY = 1;
- /**
- * The `STABLE` release channel contains features that are considered stable
- * and have been validated for production use.
- *
- * Generated from protobuf enum STABLE = 2;
- */
- const STABLE = 2;
-
- private static $valueToName = [
- self::RELEASE_CHANNEL_UNSPECIFIED => 'RELEASE_CHANNEL_UNSPECIFIED',
- self::CANARY => 'CANARY',
- self::STABLE => 'STABLE',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Service/State.php b/DataprocMetastore/src/V1alpha/Service/State.php
deleted file mode 100644
index 0c1416fbeeb5..000000000000
--- a/DataprocMetastore/src/V1alpha/Service/State.php
+++ /dev/null
@@ -1,100 +0,0 @@
-google.cloud.metastore.v1alpha.Service.State
- */
-class State
-{
- /**
- * The state of the metastore service is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metastore service is in the process of being created.
- *
- * Generated from protobuf enum CREATING = 1;
- */
- const CREATING = 1;
- /**
- * The metastore service is running and ready to serve queries.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * The metastore service is entering suspension. Its query-serving
- * availability may cease unexpectedly.
- *
- * Generated from protobuf enum SUSPENDING = 3;
- */
- const SUSPENDING = 3;
- /**
- * The metastore service is suspended and unable to serve queries.
- *
- * Generated from protobuf enum SUSPENDED = 4;
- */
- const SUSPENDED = 4;
- /**
- * The metastore service is being updated. It remains usable but cannot
- * accept additional update requests or be deleted at this time.
- *
- * Generated from protobuf enum UPDATING = 5;
- */
- const UPDATING = 5;
- /**
- * The metastore service is undergoing deletion. It cannot be used.
- *
- * Generated from protobuf enum DELETING = 6;
- */
- const DELETING = 6;
- /**
- * The metastore service has encountered an error and cannot be used. The
- * metastore service should be deleted.
- *
- * Generated from protobuf enum ERROR = 7;
- */
- const ERROR = 7;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::ACTIVE => 'ACTIVE',
- self::SUSPENDING => 'SUSPENDING',
- self::SUSPENDED => 'SUSPENDED',
- self::UPDATING => 'UPDATING',
- self::DELETING => 'DELETING',
- self::ERROR => 'ERROR',
- ];
-
- 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/DataprocMetastore/src/V1alpha/Service/Tier.php b/DataprocMetastore/src/V1alpha/Service/Tier.php
deleted file mode 100644
index 129bd355c855..000000000000
--- a/DataprocMetastore/src/V1alpha/Service/Tier.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.cloud.metastore.v1alpha.Service.Tier
- */
-class Tier
-{
- /**
- * The tier is not set.
- *
- * Generated from protobuf enum TIER_UNSPECIFIED = 0;
- */
- const TIER_UNSPECIFIED = 0;
- /**
- * The developer tier provides limited scalability and no fault tolerance.
- * Good for low-cost proof-of-concept.
- *
- * Generated from protobuf enum DEVELOPER = 1;
- */
- const DEVELOPER = 1;
- /**
- * The enterprise tier provides multi-zone high availability, and sufficient
- * scalability for enterprise-level Dataproc Metastore workloads.
- *
- * Generated from protobuf enum ENTERPRISE = 3;
- */
- const ENTERPRISE = 3;
-
- private static $valueToName = [
- self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED',
- self::DEVELOPER => 'DEVELOPER',
- self::ENTERPRISE => 'ENTERPRISE',
- ];
-
- 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/DataprocMetastore/src/V1alpha/TelemetryConfig.php b/DataprocMetastore/src/V1alpha/TelemetryConfig.php
deleted file mode 100644
index 7c3204edb841..000000000000
--- a/DataprocMetastore/src/V1alpha/TelemetryConfig.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.cloud.metastore.v1alpha.TelemetryConfig
- */
-class TelemetryConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The output format of the Dataproc Metastore service's logs.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1;
- */
- protected $log_format = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $log_format
- * The output format of the Dataproc Metastore service's logs.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The output format of the Dataproc Metastore service's logs.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1;
- * @return int
- */
- public function getLogFormat()
- {
- return $this->log_format;
- }
-
- /**
- * The output format of the Dataproc Metastore service's logs.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat log_format = 1;
- * @param int $var
- * @return $this
- */
- public function setLogFormat($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1alpha\TelemetryConfig\LogFormat::class);
- $this->log_format = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/TelemetryConfig/LogFormat.php b/DataprocMetastore/src/V1alpha/TelemetryConfig/LogFormat.php
deleted file mode 100644
index d3726ba3e61f..000000000000
--- a/DataprocMetastore/src/V1alpha/TelemetryConfig/LogFormat.php
+++ /dev/null
@@ -1,60 +0,0 @@
-google.cloud.metastore.v1alpha.TelemetryConfig.LogFormat
- */
-class LogFormat
-{
- /**
- * The LOG_FORMAT is not set.
- *
- * Generated from protobuf enum LOG_FORMAT_UNSPECIFIED = 0;
- */
- const LOG_FORMAT_UNSPECIFIED = 0;
- /**
- * Logging output uses the legacy `textPayload` format.
- *
- * Generated from protobuf enum LEGACY = 1;
- */
- const LEGACY = 1;
- /**
- * Logging output uses the `jsonPayload` format.
- *
- * Generated from protobuf enum JSON = 2;
- */
- const JSON = 2;
-
- private static $valueToName = [
- self::LOG_FORMAT_UNSPECIFIED => 'LOG_FORMAT_UNSPECIFIED',
- self::LEGACY => 'LEGACY',
- self::JSON => 'JSON',
- ];
-
- 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/DataprocMetastore/src/V1alpha/UpdateFederationRequest.php b/DataprocMetastore/src/V1alpha/UpdateFederationRequest.php
deleted file mode 100644
index 3ac9e9f19e6b..000000000000
--- a/DataprocMetastore/src/V1alpha/UpdateFederationRequest.php
+++ /dev/null
@@ -1,215 +0,0 @@
-google.cloud.metastore.v1alpha.UpdateFederationRequest
- */
-class UpdateFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
- /**
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $federation = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @type \Google\Cloud\Metastore\V1alpha\Federation $federation
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\Federation|null
- */
- public function getFederation()
- {
- return $this->federation;
- }
-
- public function hasFederation()
- {
- return isset($this->federation);
- }
-
- public function clearFederation()
- {
- unset($this->federation);
- }
-
- /**
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\Federation $var
- * @return $this
- */
- public function setFederation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Federation::class);
- $this->federation = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/UpdateMetadataImportRequest.php b/DataprocMetastore/src/V1alpha/UpdateMetadataImportRequest.php
deleted file mode 100644
index a61c5e3fb348..000000000000
--- a/DataprocMetastore/src/V1alpha/UpdateMetadataImportRequest.php
+++ /dev/null
@@ -1,216 +0,0 @@
-google.cloud.metastore.v1alpha.UpdateMetadataImportRequest
- */
-class UpdateMetadataImportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
- /**
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $metadata_import = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @type \Google\Cloud\Metastore\V1alpha\MetadataImport $metadata_import
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\MetadataImport|null
- */
- public function getMetadataImport()
- {
- return $this->metadata_import;
- }
-
- public function hasMetadataImport()
- {
- return isset($this->metadata_import);
- }
-
- public function clearMetadataImport()
- {
- unset($this->metadata_import);
- }
-
- /**
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\MetadataImport $var
- * @return $this
- */
- public function setMetadataImport($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\MetadataImport::class);
- $this->metadata_import = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/UpdateServiceRequest.php b/DataprocMetastore/src/V1alpha/UpdateServiceRequest.php
deleted file mode 100644
index 28939877147e..000000000000
--- a/DataprocMetastore/src/V1alpha/UpdateServiceRequest.php
+++ /dev/null
@@ -1,216 +0,0 @@
-google.cloud.metastore.v1alpha.UpdateServiceRequest
- */
-class UpdateServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
- /**
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $service = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @type \Google\Cloud\Metastore\V1alpha\Service $service
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Alpha\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1alpha\Service|null
- */
- public function getService()
- {
- return $this->service;
- }
-
- public function hasService()
- {
- return isset($this->service);
- }
-
- public function clearService()
- {
- unset($this->service);
- }
-
- /**
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1alpha.Service service = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1alpha\Service $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1alpha\Service::class);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1alpha/gapic_metadata.json b/DataprocMetastore/src/V1alpha/gapic_metadata.json
deleted file mode 100644
index 1276f9994a16..000000000000
--- a/DataprocMetastore/src/V1alpha/gapic_metadata.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "schema": "1.0",
- "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods",
- "language": "php",
- "protoPackage": "google.cloud.metastore.v1alpha",
- "libraryPackage": "Google\\Cloud\\Metastore\\V1alpha",
- "services": {
- "DataprocMetastore": {
- "clients": {
- "grpc": {
- "libraryClient": "DataprocMetastoreGapicClient",
- "rpcs": {
- "AlterMetadataResourceLocation": {
- "methods": [
- "alterMetadataResourceLocation"
- ]
- },
- "CreateBackup": {
- "methods": [
- "createBackup"
- ]
- },
- "CreateMetadataImport": {
- "methods": [
- "createMetadataImport"
- ]
- },
- "CreateService": {
- "methods": [
- "createService"
- ]
- },
- "DeleteBackup": {
- "methods": [
- "deleteBackup"
- ]
- },
- "DeleteService": {
- "methods": [
- "deleteService"
- ]
- },
- "ExportMetadata": {
- "methods": [
- "exportMetadata"
- ]
- },
- "GetBackup": {
- "methods": [
- "getBackup"
- ]
- },
- "GetMetadataImport": {
- "methods": [
- "getMetadataImport"
- ]
- },
- "GetService": {
- "methods": [
- "getService"
- ]
- },
- "ListBackups": {
- "methods": [
- "listBackups"
- ]
- },
- "ListMetadataImports": {
- "methods": [
- "listMetadataImports"
- ]
- },
- "ListServices": {
- "methods": [
- "listServices"
- ]
- },
- "MoveTableToDatabase": {
- "methods": [
- "moveTableToDatabase"
- ]
- },
- "QueryMetadata": {
- "methods": [
- "queryMetadata"
- ]
- },
- "RemoveIamPolicy": {
- "methods": [
- "removeIamPolicy"
- ]
- },
- "RestoreService": {
- "methods": [
- "restoreService"
- ]
- },
- "UpdateMetadataImport": {
- "methods": [
- "updateMetadataImport"
- ]
- },
- "UpdateService": {
- "methods": [
- "updateService"
- ]
- },
- "GetLocation": {
- "methods": [
- "getLocation"
- ]
- },
- "ListLocations": {
- "methods": [
- "listLocations"
- ]
- },
- "GetIamPolicy": {
- "methods": [
- "getIamPolicy"
- ]
- },
- "SetIamPolicy": {
- "methods": [
- "setIamPolicy"
- ]
- },
- "TestIamPermissions": {
- "methods": [
- "testIamPermissions"
- ]
- }
- }
- }
- }
- },
- "DataprocMetastoreFederation": {
- "clients": {
- "grpc": {
- "libraryClient": "DataprocMetastoreFederationGapicClient",
- "rpcs": {
- "CreateFederation": {
- "methods": [
- "createFederation"
- ]
- },
- "DeleteFederation": {
- "methods": [
- "deleteFederation"
- ]
- },
- "GetFederation": {
- "methods": [
- "getFederation"
- ]
- },
- "ListFederations": {
- "methods": [
- "listFederations"
- ]
- },
- "UpdateFederation": {
- "methods": [
- "updateFederation"
- ]
- },
- "GetLocation": {
- "methods": [
- "getLocation"
- ]
- },
- "ListLocations": {
- "methods": [
- "listLocations"
- ]
- },
- "GetIamPolicy": {
- "methods": [
- "getIamPolicy"
- ]
- },
- "SetIamPolicy": {
- "methods": [
- "setIamPolicy"
- ]
- },
- "TestIamPermissions": {
- "methods": [
- "testIamPermissions"
- ]
- }
- }
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_client_config.json b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_client_config.json
deleted file mode 100644
index 2355e4bd3525..000000000000
--- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_client_config.json
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- "interfaces": {
- "google.cloud.metastore.v1alpha.DataprocMetastore": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_1_codes": [
- "UNAVAILABLE"
- ],
- "no_retry_1_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 1000,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 10000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000
- }
- },
- "methods": {
- "AlterMetadataResourceLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "CreateBackup": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "CreateMetadataImport": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "CreateService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "DeleteBackup": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "DeleteService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "ExportMetadata": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetBackup": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetMetadataImport": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetService": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListBackups": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListMetadataImports": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListServices": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "MoveTableToDatabase": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "QueryMetadata": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "RemoveIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "RestoreService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "UpdateMetadataImport": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "UpdateService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListLocations": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- }
- }
- }
- }
-}
diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php
deleted file mode 100644
index 6bb0b1c9e93b..000000000000
--- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php
+++ /dev/null
@@ -1,201 +0,0 @@
- [
- 'google.cloud.metastore.v1alpha.DataprocMetastore' => [
- 'AlterMetadataResourceLocation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\AlterMetadataResourceLocationResponse',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateBackup' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\Backup',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateMetadataImport' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\MetadataImport',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\Service',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteBackup' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ExportMetadata' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\MetadataExport',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'MoveTableToDatabase' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\MoveTableToDatabaseResponse',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'QueryMetadata' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\QueryMetadataResponse',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'RestoreService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\Restore',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpdateMetadataImport' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\MetadataImport',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpdateService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\Service',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ListBackups' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getBackups',
- ],
- ],
- 'ListMetadataImports' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getMetadataImports',
- ],
- ],
- 'ListServices' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getServices',
- ],
- ],
- 'GetLocation' => [
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'ListLocations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getLocations',
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'GetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- ],
- ],
-];
diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_client_config.json b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_client_config.json
deleted file mode 100644
index 360aa62b94ff..000000000000
--- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_client_config.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "interfaces": {
- "google.cloud.metastore.v1alpha.DataprocMetastoreFederation": {
- "retry_codes": {
- "no_retry_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- }
- },
- "methods": {
- "CreateFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "DeleteFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "GetFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "ListFederations": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "UpdateFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "GetLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "ListLocations": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- }
- }
- }
- }
-}
diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php
deleted file mode 100644
index 11f1cbce2581..000000000000
--- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php
+++ /dev/null
@@ -1,91 +0,0 @@
- [
- 'google.cloud.metastore.v1alpha.DataprocMetastoreFederation' => [
- 'CreateFederation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\Federation',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteFederation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpdateFederation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1alpha\Federation',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1alpha\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ListFederations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getFederations',
- ],
- ],
- 'GetLocation' => [
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'ListLocations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getLocations',
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'GetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- ],
- ],
-];
diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php
deleted file mode 100644
index 6265cadd23a0..000000000000
--- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php
+++ /dev/null
@@ -1,263 +0,0 @@
- [
- 'google.cloud.location.Locations' => [
- 'GetLocation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListLocations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*}/locations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.cloud.metastore.v1alpha.DataprocMetastoreFederation' => [
- 'CreateFederation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*}/federations',
- 'body' => 'federation',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'federation_id',
- ],
- ],
- 'DeleteFederation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/federations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetFederation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/federations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListFederations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*}/federations',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'UpdateFederation' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1alpha/{federation.name=projects/*/locations/*/federations/*}',
- 'body' => 'federation',
- 'placeholders' => [
- 'federation.name' => [
- 'getters' => [
- 'getFederation',
- 'getName',
- ],
- ],
- ],
- 'queryParams' => [
- 'update_mask',
- ],
- ],
- ],
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/federations/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/federations/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/federations/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'CancelOperation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteOperation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*}/operations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php
deleted file mode 100644
index cc57a96689a2..000000000000
--- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php
+++ /dev/null
@@ -1,436 +0,0 @@
- [
- 'google.cloud.location.Locations' => [
- 'GetLocation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListLocations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*}/locations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.cloud.metastore.v1alpha.DataprocMetastore' => [
- 'AlterMetadataResourceLocation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{service=projects/*/locations/*/services/*}:alterLocation',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'CreateBackup' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*/services/*}/backups',
- 'body' => 'backup',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'backup_id',
- ],
- ],
- 'CreateMetadataImport' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports',
- 'body' => 'metadata_import',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'metadata_import_id',
- ],
- ],
- 'CreateService' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*}/services',
- 'body' => 'service',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'service_id',
- ],
- ],
- 'DeleteBackup' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/services/*/backups/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteService' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/services/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ExportMetadata' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'GetBackup' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/services/*/backups/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetMetadataImport' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/services/*/metadataImports/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetService' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/services/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListBackups' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*/services/*}/backups',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListMetadataImports' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*/services/*}/metadataImports',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListServices' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{parent=projects/*/locations/*}/services',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'MoveTableToDatabase' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{service=projects/*/locations/*/services/*}:moveTableToDatabase',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'QueryMetadata' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{service=projects/*/locations/*/services/*}:queryMetadata',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'RemoveIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy',
- 'body' => '*',
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'RestoreService' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{service=projects/*/locations/*/services/*}:restore',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'UpdateMetadataImport' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1alpha/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}',
- 'body' => 'metadata_import',
- 'placeholders' => [
- 'metadata_import.name' => [
- 'getters' => [
- 'getMetadataImport',
- 'getName',
- ],
- ],
- ],
- 'queryParams' => [
- 'update_mask',
- ],
- ],
- 'UpdateService' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1alpha/{service.name=projects/*/locations/*/services/*}',
- 'body' => 'service',
- 'placeholders' => [
- 'service.name' => [
- 'getters' => [
- 'getService',
- 'getName',
- ],
- ],
- ],
- 'queryParams' => [
- 'update_mask',
- ],
- ],
- ],
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/federations/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/federations/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{resource=projects/*/locations/*/federations/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'CancelOperation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/operations/*}:cancel',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteOperation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1alpha/{name=projects/*/locations/*}/operations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/DataprocMetastore/src/V1beta/AlterMetadataResourceLocationRequest.php b/DataprocMetastore/src/V1beta/AlterMetadataResourceLocationRequest.php
deleted file mode 100644
index fc849cb388b1..000000000000
--- a/DataprocMetastore/src/V1beta/AlterMetadataResourceLocationRequest.php
+++ /dev/null
@@ -1,164 +0,0 @@
-google.cloud.metastore.v1beta.AlterMetadataResourceLocationRequest
- */
-class AlterMetadataResourceLocationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- *
- * Generated from protobuf field string resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $resource_name = '';
- /**
- * Required. The new location URI for the metadata resource.
- *
- * Generated from protobuf field string location_uri = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $location_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $resource_name
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- * @type string $location_uri
- * Required. The new location URI for the metadata resource.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- *
- * Generated from protobuf field string resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getResourceName()
- {
- return $this->resource_name;
- }
-
- /**
- * Required. The relative metadata resource name in the following format.
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- *
- * Generated from protobuf field string resource_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setResourceName($var)
- {
- GPBUtil::checkString($var, True);
- $this->resource_name = $var;
-
- return $this;
- }
-
- /**
- * Required. The new location URI for the metadata resource.
- *
- * Generated from protobuf field string location_uri = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getLocationUri()
- {
- return $this->location_uri;
- }
-
- /**
- * Required. The new location URI for the metadata resource.
- *
- * Generated from protobuf field string location_uri = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setLocationUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->location_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/AlterMetadataResourceLocationResponse.php b/DataprocMetastore/src/V1beta/AlterMetadataResourceLocationResponse.php
deleted file mode 100644
index 03eec5061def..000000000000
--- a/DataprocMetastore/src/V1beta/AlterMetadataResourceLocationResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.cloud.metastore.v1beta.AlterMetadataResourceLocationResponse
- */
-class AlterMetadataResourceLocationResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/AuxiliaryVersionConfig.php b/DataprocMetastore/src/V1beta/AuxiliaryVersionConfig.php
deleted file mode 100644
index 968460eae50e..000000000000
--- a/DataprocMetastore/src/V1beta/AuxiliaryVersionConfig.php
+++ /dev/null
@@ -1,169 +0,0 @@
-google.cloud.metastore.v1beta.AuxiliaryVersionConfig
- */
-class AuxiliaryVersionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- *
- * Generated from protobuf field string version = 1;
- */
- protected $version = '';
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- *
- * Generated from protobuf field map config_overrides = 2;
- */
- private $config_overrides;
- /**
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $network_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $version
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- * @type array|\Google\Protobuf\Internal\MapField $config_overrides
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- * @type \Google\Cloud\Metastore\V1beta\NetworkConfig $network_config
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- *
- * Generated from protobuf field string version = 1;
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * The Hive metastore version of the auxiliary service. It must be less
- * than the primary Hive metastore service's version.
- *
- * Generated from protobuf field string version = 1;
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getConfigOverrides()
- {
- return $this->config_overrides;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * auxiliary Hive metastore (configured in `hive-site.xml`) in addition to
- * the primary version's overrides. If keys are present in both the auxiliary
- * version's overrides and the primary version's overrides, the value from
- * the auxiliary version's overrides takes precedence.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setConfigOverrides($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->config_overrides = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Metastore\V1beta\NetworkConfig|null
- */
- public function getNetworkConfig()
- {
- return $this->network_config;
- }
-
- public function hasNetworkConfig()
- {
- return isset($this->network_config);
- }
-
- public function clearNetworkConfig()
- {
- unset($this->network_config);
- }
-
- /**
- * Output only. The network configuration contains the endpoint URI(s) of the
- * auxiliary Hive metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.NetworkConfig network_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Metastore\V1beta\NetworkConfig $var
- * @return $this
- */
- public function setNetworkConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\NetworkConfig::class);
- $this->network_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/BackendMetastore.php b/DataprocMetastore/src/V1beta/BackendMetastore.php
deleted file mode 100644
index 6b4bff0e5194..000000000000
--- a/DataprocMetastore/src/V1beta/BackendMetastore.php
+++ /dev/null
@@ -1,125 +0,0 @@
-google.cloud.metastore.v1beta.BackendMetastore
- */
-class BackendMetastore extends \Google\Protobuf\Internal\Message
-{
- /**
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * The type of the backend metastore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2;
- */
- protected $metastore_type = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- * @type int $metastore_type
- * The type of the backend metastore.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The relative resource name of the metastore that is being federated.
- * The formats of the relative resource names for the currently supported
- * metastores are listed below:
- * * BigQuery
- * * `projects/{project_id}`
- * * Dataproc Metastore
- * * `projects/{project_id}/locations/{location}/services/{service_id}`
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The type of the backend metastore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2;
- * @return int
- */
- public function getMetastoreType()
- {
- return $this->metastore_type;
- }
-
- /**
- * The type of the backend metastore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.BackendMetastore.MetastoreType metastore_type = 2;
- * @param int $var
- * @return $this
- */
- public function setMetastoreType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\BackendMetastore\MetastoreType::class);
- $this->metastore_type = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/BackendMetastore/MetastoreType.php b/DataprocMetastore/src/V1beta/BackendMetastore/MetastoreType.php
deleted file mode 100644
index 1269fb4b3143..000000000000
--- a/DataprocMetastore/src/V1beta/BackendMetastore/MetastoreType.php
+++ /dev/null
@@ -1,69 +0,0 @@
-google.cloud.metastore.v1beta.BackendMetastore.MetastoreType
- */
-class MetastoreType
-{
- /**
- * The metastore type is not set.
- *
- * Generated from protobuf enum METASTORE_TYPE_UNSPECIFIED = 0;
- */
- const METASTORE_TYPE_UNSPECIFIED = 0;
- /**
- * The backend metastore is Dataplex.
- *
- * Generated from protobuf enum DATAPLEX = 1;
- */
- const DATAPLEX = 1;
- /**
- * The backend metastore is BigQuery.
- *
- * Generated from protobuf enum BIGQUERY = 2;
- */
- const BIGQUERY = 2;
- /**
- * The backend metastore is Dataproc Metastore.
- *
- * Generated from protobuf enum DATAPROC_METASTORE = 3;
- */
- const DATAPROC_METASTORE = 3;
-
- private static $valueToName = [
- self::METASTORE_TYPE_UNSPECIFIED => 'METASTORE_TYPE_UNSPECIFIED',
- self::DATAPLEX => 'DATAPLEX',
- self::BIGQUERY => 'BIGQUERY',
- self::DATAPROC_METASTORE => 'DATAPROC_METASTORE',
- ];
-
- 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/DataprocMetastore/src/V1beta/Backup.php b/DataprocMetastore/src/V1beta/Backup.php
deleted file mode 100644
index 977bf921c001..000000000000
--- a/DataprocMetastore/src/V1beta/Backup.php
+++ /dev/null
@@ -1,305 +0,0 @@
-google.cloud.metastore.v1beta.Backup
- */
-class Backup extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * Output only. The time when the backup was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the backup finished creating.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. The revision of the service at the time of backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $service_revision = null;
- /**
- * The description of the backup.
- *
- * Generated from protobuf field string description = 6;
- */
- protected $description = '';
- /**
- * Output only. Services that are restoring from the backup.
- *
- * Generated from protobuf field repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $restoring_services;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the backup was started.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the backup finished creating.
- * @type int $state
- * Output only. The current state of the backup.
- * @type \Google\Cloud\Metastore\V1beta\Service $service_revision
- * Output only. The revision of the service at the time of backup.
- * @type string $description
- * The description of the backup.
- * @type array|\Google\Protobuf\Internal\RepeatedField $restoring_services
- * Output only. Services that are restoring from the backup.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the backup, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the backup was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the backup was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the backup finished creating.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the backup finished creating.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Backup.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Backup\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. The revision of the service at the time of backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Metastore\V1beta\Service|null
- */
- public function getServiceRevision()
- {
- return $this->service_revision;
- }
-
- public function hasServiceRevision()
- {
- return isset($this->service_revision);
- }
-
- public function clearServiceRevision()
- {
- unset($this->service_revision);
- }
-
- /**
- * Output only. The revision of the service at the time of backup.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service_revision = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Metastore\V1beta\Service $var
- * @return $this
- */
- public function setServiceRevision($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Service::class);
- $this->service_revision = $var;
-
- return $this;
- }
-
- /**
- * The description of the backup.
- *
- * Generated from protobuf field string description = 6;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * The description of the backup.
- *
- * Generated from protobuf field string description = 6;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Output only. Services that are restoring from the backup.
- *
- * Generated from protobuf field repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRestoringServices()
- {
- return $this->restoring_services;
- }
-
- /**
- * Output only. Services that are restoring from the backup.
- *
- * Generated from protobuf field repeated string restoring_services = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRestoringServices($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->restoring_services = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Backup/State.php b/DataprocMetastore/src/V1beta/Backup/State.php
deleted file mode 100644
index 151c85f71e6a..000000000000
--- a/DataprocMetastore/src/V1beta/Backup/State.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.cloud.metastore.v1beta.Backup.State
- */
-class State
-{
- /**
- * The state of the backup is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The backup is being created.
- *
- * Generated from protobuf enum CREATING = 1;
- */
- const CREATING = 1;
- /**
- * The backup is being deleted.
- *
- * Generated from protobuf enum DELETING = 2;
- */
- const DELETING = 2;
- /**
- * The backup is active and ready to use.
- *
- * Generated from protobuf enum ACTIVE = 3;
- */
- const ACTIVE = 3;
- /**
- * The backup failed.
- *
- * Generated from protobuf enum FAILED = 4;
- */
- const FAILED = 4;
- /**
- * The backup is being restored.
- *
- * Generated from protobuf enum RESTORING = 5;
- */
- const RESTORING = 5;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::DELETING => 'DELETING',
- self::ACTIVE => 'ACTIVE',
- self::FAILED => 'FAILED',
- self::RESTORING => 'RESTORING',
- ];
-
- 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/DataprocMetastore/src/V1beta/CreateBackupRequest.php b/DataprocMetastore/src/V1beta/CreateBackupRequest.php
deleted file mode 100644
index 27db0ea6542e..000000000000
--- a/DataprocMetastore/src/V1beta/CreateBackupRequest.php
+++ /dev/null
@@ -1,244 +0,0 @@
-google.cloud.metastore.v1beta.CreateBackupRequest
- */
-class CreateBackupRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $backup_id = '';
- /**
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $backup = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type string $backup_id
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @type \Google\Cloud\Metastore\V1beta\Backup $backup
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * backup of the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getBackupId()
- {
- return $this->backup_id;
- }
-
- /**
- * Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setBackupId($var)
- {
- GPBUtil::checkString($var, True);
- $this->backup_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\Backup|null
- */
- public function getBackup()
- {
- return $this->backup;
- }
-
- public function hasBackup()
- {
- return isset($this->backup);
- }
-
- public function clearBackup()
- {
- unset($this->backup);
- }
-
- /**
- * Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\Backup $var
- * @return $this
- */
- public function setBackup($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Backup::class);
- $this->backup = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/CreateFederationRequest.php b/DataprocMetastore/src/V1beta/CreateFederationRequest.php
deleted file mode 100644
index bbc27b9a9cb9..000000000000
--- a/DataprocMetastore/src/V1beta/CreateFederationRequest.php
+++ /dev/null
@@ -1,247 +0,0 @@
-google.cloud.metastore.v1beta.CreateFederationRequest
- */
-class CreateFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string federation_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $federation_id = '';
- /**
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $federation = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type string $federation_id
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @type \Google\Cloud\Metastore\V1beta\Federation $federation
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string federation_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getFederationId()
- {
- return $this->federation_id;
- }
-
- /**
- * Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string federation_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setFederationId($var)
- {
- GPBUtil::checkString($var, True);
- $this->federation_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\Federation|null
- */
- public function getFederation()
- {
- return $this->federation;
- }
-
- public function hasFederation()
- {
- return isset($this->federation);
- }
-
- public function clearFederation()
- {
- unset($this->federation);
- }
-
- /**
- * Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation federation = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\Federation $var
- * @return $this
- */
- public function setFederation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Federation::class);
- $this->federation = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/CreateMetadataImportRequest.php b/DataprocMetastore/src/V1beta/CreateMetadataImportRequest.php
deleted file mode 100644
index 0b854d8101a3..000000000000
--- a/DataprocMetastore/src/V1beta/CreateMetadataImportRequest.php
+++ /dev/null
@@ -1,248 +0,0 @@
-google.cloud.metastore.v1beta.CreateMetadataImportRequest
- */
-class CreateMetadataImportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $metadata_import_id = '';
- /**
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $metadata_import = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type string $metadata_import_id
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @type \Google\Cloud\Metastore\V1beta\MetadataImport $metadata_import
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getMetadataImportId()
- {
- return $this->metadata_import_id;
- }
-
- /**
- * Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- *
- * Generated from protobuf field string metadata_import_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setMetadataImportId($var)
- {
- GPBUtil::checkString($var, True);
- $this->metadata_import_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\MetadataImport|null
- */
- public function getMetadataImport()
- {
- return $this->metadata_import;
- }
-
- public function hasMetadataImport()
- {
- return isset($this->metadata_import);
- }
-
- public function clearMetadataImport()
- {
- unset($this->metadata_import);
- }
-
- /**
- * Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport metadata_import = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\MetadataImport $var
- * @return $this
- */
- public function setMetadataImport($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\MetadataImport::class);
- $this->metadata_import = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/CreateServiceRequest.php b/DataprocMetastore/src/V1beta/CreateServiceRequest.php
deleted file mode 100644
index b4c1d5f098ec..000000000000
--- a/DataprocMetastore/src/V1beta/CreateServiceRequest.php
+++ /dev/null
@@ -1,248 +0,0 @@
-google.cloud.metastore.v1beta.CreateServiceRequest
- */
-class CreateServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $service_id = '';
- /**
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $service = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type string $service_id
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @type \Google\Cloud\Metastore\V1beta\Service $service
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getServiceId()
- {
- return $this->service_id;
- }
-
- /**
- * Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- *
- * Generated from protobuf field string service_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setServiceId($var)
- {
- GPBUtil::checkString($var, True);
- $this->service_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\Service|null
- */
- public function getService()
- {
- return $this->service;
- }
-
- public function hasService()
- {
- return isset($this->service);
- }
-
- public function clearService()
- {
- unset($this->service);
- }
-
- /**
- * Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\Service $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Service::class);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/DataCatalogConfig.php b/DataprocMetastore/src/V1beta/DataCatalogConfig.php
deleted file mode 100644
index d445745eba1e..000000000000
--- a/DataprocMetastore/src/V1beta/DataCatalogConfig.php
+++ /dev/null
@@ -1,72 +0,0 @@
-google.cloud.metastore.v1beta.DataCatalogConfig
- */
-class DataCatalogConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- *
- * Generated from protobuf field bool enabled = 2;
- */
- protected $enabled = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $enabled
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- *
- * Generated from protobuf field bool enabled = 2;
- * @return bool
- */
- public function getEnabled()
- {
- return $this->enabled;
- }
-
- /**
- * Defines whether the metastore metadata should be synced to Data Catalog.
- * The default value is to disable syncing metastore metadata to Data Catalog.
- *
- * Generated from protobuf field bool enabled = 2;
- * @param bool $var
- * @return $this
- */
- public function setEnabled($var)
- {
- GPBUtil::checkBool($var);
- $this->enabled = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/DatabaseDumpSpec.php b/DataprocMetastore/src/V1beta/DatabaseDumpSpec.php
deleted file mode 100644
index 3f8713173032..000000000000
--- a/DataprocMetastore/src/V1beta/DatabaseDumpSpec.php
+++ /dev/null
@@ -1,33 +0,0 @@
-google.cloud.metastore.v1beta.DatabaseDumpSpec
- */
-class DatabaseDumpSpec extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/DatabaseDumpSpec/Type.php b/DataprocMetastore/src/V1beta/DatabaseDumpSpec/Type.php
deleted file mode 100644
index 46157eb70c77..000000000000
--- a/DataprocMetastore/src/V1beta/DatabaseDumpSpec/Type.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1beta.DatabaseDumpSpec.Type
- */
-class Type
-{
- /**
- * The type of the database dump is unknown.
- *
- * Generated from protobuf enum TYPE_UNSPECIFIED = 0;
- */
- const TYPE_UNSPECIFIED = 0;
- /**
- * Database dump is a MySQL dump file.
- *
- * Generated from protobuf enum MYSQL = 1;
- */
- const MYSQL = 1;
- /**
- * Database dump contains Avro files.
- *
- * Generated from protobuf enum AVRO = 2;
- */
- const AVRO = 2;
-
- private static $valueToName = [
- self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
- self::MYSQL => 'MYSQL',
- self::AVRO => 'AVRO',
- ];
-
- 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/DataprocMetastore/src/V1beta/DataplexConfig.php b/DataprocMetastore/src/V1beta/DataplexConfig.php
deleted file mode 100644
index 65bf50507bad..000000000000
--- a/DataprocMetastore/src/V1beta/DataplexConfig.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.DataplexConfig
- */
-class DataplexConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- *
- * Generated from protobuf field map lake_resources = 1;
- */
- private $lake_resources;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $lake_resources
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- *
- * Generated from protobuf field map lake_resources = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLakeResources()
- {
- return $this->lake_resources;
- }
-
- /**
- * A reference to the Lake resources that this metastore service is attached
- * to. The key is the lake resource name. Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
- *
- * Generated from protobuf field map lake_resources = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLakeResources($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\Lake::class);
- $this->lake_resources = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/DataprocMetastoreClient.php b/DataprocMetastore/src/V1beta/DataprocMetastoreClient.php
deleted file mode 100644
index 09096c93f820..000000000000
--- a/DataprocMetastore/src/V1beta/DataprocMetastoreClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
-google.cloud.metastore.v1beta.DeleteBackupRequest
- */
-class DeleteBackupRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the backup to delete, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/DeleteFederationRequest.php b/DataprocMetastore/src/V1beta/DeleteFederationRequest.php
deleted file mode 100644
index 37ea8f14cf98..000000000000
--- a/DataprocMetastore/src/V1beta/DeleteFederationRequest.php
+++ /dev/null
@@ -1,145 +0,0 @@
-google.cloud.metastore.v1beta.DeleteFederationRequest
- */
-class DeleteFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/DeleteServiceRequest.php b/DataprocMetastore/src/V1beta/DeleteServiceRequest.php
deleted file mode 100644
index 98a261602e43..000000000000
--- a/DataprocMetastore/src/V1beta/DeleteServiceRequest.php
+++ /dev/null
@@ -1,146 +0,0 @@
-google.cloud.metastore.v1beta.DeleteServiceRequest
- */
-class DeleteServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore service to delete, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/EncryptionConfig.php b/DataprocMetastore/src/V1beta/EncryptionConfig.php
deleted file mode 100644
index 0c580153147d..000000000000
--- a/DataprocMetastore/src/V1beta/EncryptionConfig.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1beta.EncryptionConfig
- */
-class EncryptionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- *
- * Generated from protobuf field string kms_key = 1;
- */
- protected $kms_key = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $kms_key
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- *
- * Generated from protobuf field string kms_key = 1;
- * @return string
- */
- public function getKmsKey()
- {
- return $this->kms_key;
- }
-
- /**
- * The fully qualified customer provided Cloud KMS key name to use for
- * customer data encryption, in the following form:
- * `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
- *
- * Generated from protobuf field string kms_key = 1;
- * @param string $var
- * @return $this
- */
- public function setKmsKey($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ErrorDetails.php b/DataprocMetastore/src/V1beta/ErrorDetails.php
deleted file mode 100644
index f92d367a604b..000000000000
--- a/DataprocMetastore/src/V1beta/ErrorDetails.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.ErrorDetails
- */
-class ErrorDetails extends \Google\Protobuf\Internal\Message
-{
- /**
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- *
- * Generated from protobuf field map details = 1;
- */
- private $details;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $details
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- *
- * Generated from protobuf field map details = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getDetails()
- {
- return $this->details;
- }
-
- /**
- * Additional structured details about this error.
- * Keys define the failure items.
- * Value describes the exception or details of the item.
- *
- * Generated from protobuf field map details = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setDetails($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->details = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ExportMetadataRequest.php b/DataprocMetastore/src/V1beta/ExportMetadataRequest.php
deleted file mode 100644
index 562eeb937f38..000000000000
--- a/DataprocMetastore/src/V1beta/ExportMetadataRequest.php
+++ /dev/null
@@ -1,232 +0,0 @@
-google.cloud.metastore.v1beta.ExportMetadataRequest
- */
-class ExportMetadataRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $database_dump_type = 0;
- protected $destination;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $destination_gcs_folder
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- * @type string $service
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @type int $database_dump_type
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- *
- * Generated from protobuf field string destination_gcs_folder = 2;
- * @return string
- */
- public function getDestinationGcsFolder()
- {
- return $this->readOneof(2);
- }
-
- public function hasDestinationGcsFolder()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- *
- * Generated from protobuf field string destination_gcs_folder = 2;
- * @param string $var
- * @return $this
- */
- public function setDestinationGcsFolder($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * export, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getDatabaseDumpType()
- {
- return $this->database_dump_type;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setDatabaseDumpType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\DatabaseDumpSpec\Type::class);
- $this->database_dump_type = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getDestination()
- {
- return $this->whichOneof("destination");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Federation.php b/DataprocMetastore/src/V1beta/Federation.php
deleted file mode 100644
index 7751b7c96516..000000000000
--- a/DataprocMetastore/src/V1beta/Federation.php
+++ /dev/null
@@ -1,433 +0,0 @@
-google.cloud.metastore.v1beta.Federation
- */
-class Federation extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * Output only. The time when the metastore federation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the metastore federation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * User-defined labels for the metastore federation.
- *
- * Generated from protobuf field map labels = 4;
- */
- private $labels;
- /**
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- *
- * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $version = '';
- /**
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- *
- * Generated from protobuf field map backend_metastores = 6;
- */
- private $backend_metastores;
- /**
- * Output only. The federation endpoint.
- *
- * Generated from protobuf field string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $endpoint_uri = '';
- /**
- * Output only. The current state of the federation.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- *
- * Generated from protobuf field string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state_message = '';
- /**
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- *
- * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the metastore federation was created.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The time when the metastore federation was last updated.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * User-defined labels for the metastore federation.
- * @type string $version
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- * @type array|\Google\Protobuf\Internal\MapField $backend_metastores
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- * @type string $endpoint_uri
- * Output only. The federation endpoint.
- * @type int $state
- * Output only. The current state of the federation.
- * @type string $state_message
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- * @type string $uid
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the federation, of the
- * form:
- * projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore federation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the metastore federation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore federation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The time when the metastore federation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * User-defined labels for the metastore federation.
- *
- * Generated from protobuf field map labels = 4;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * User-defined labels for the metastore federation.
- *
- * Generated from protobuf field map labels = 4;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
-
- return $this;
- }
-
- /**
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- *
- * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Immutable. The Apache Hive metastore version of the federation. All backend
- * metastore versions must be compatible with the federation version.
- *
- * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- *
- * Generated from protobuf field map backend_metastores = 6;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getBackendMetastores()
- {
- return $this->backend_metastores;
- }
-
- /**
- * A map from `BackendMetastore` rank to `BackendMetastore`s from which the
- * federation service serves metadata at query time. The map key represents
- * the order in which `BackendMetastore`s should be evaluated to resolve
- * database names at query time and should be greater than or equal to zero. A
- * `BackendMetastore` with a lower number will be evaluated before a
- * `BackendMetastore` with a higher number.
- *
- * Generated from protobuf field map backend_metastores = 6;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setBackendMetastores($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\BackendMetastore::class);
- $this->backend_metastores = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The federation endpoint.
- *
- * Generated from protobuf field string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEndpointUri()
- {
- return $this->endpoint_uri;
- }
-
- /**
- * Output only. The federation endpoint.
- *
- * Generated from protobuf field string endpoint_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEndpointUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_uri = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the federation.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the federation.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Federation\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- *
- * Generated from protobuf field string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getStateMessage()
- {
- return $this->state_message;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore federation, if available.
- *
- * Generated from protobuf field string state_message = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setStateMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->state_message = $var;
-
- return $this;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- *
- * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * federation.
- *
- * Generated from protobuf field string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Federation/State.php b/DataprocMetastore/src/V1beta/Federation/State.php
deleted file mode 100644
index 7f0b200fb549..000000000000
--- a/DataprocMetastore/src/V1beta/Federation/State.php
+++ /dev/null
@@ -1,85 +0,0 @@
-google.cloud.metastore.v1beta.Federation.State
- */
-class State
-{
- /**
- * The state of the metastore federation is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metastore federation is in the process of being created.
- *
- * Generated from protobuf enum CREATING = 1;
- */
- const CREATING = 1;
- /**
- * The metastore federation is running and ready to serve queries.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * The metastore federation is being updated. It remains usable but cannot
- * accept additional update requests or be deleted at this time.
- *
- * Generated from protobuf enum UPDATING = 3;
- */
- const UPDATING = 3;
- /**
- * The metastore federation is undergoing deletion. It cannot be used.
- *
- * Generated from protobuf enum DELETING = 4;
- */
- const DELETING = 4;
- /**
- * The metastore federation has encountered an error and cannot be used. The
- * metastore federation should be deleted.
- *
- * Generated from protobuf enum ERROR = 5;
- */
- const ERROR = 5;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::ACTIVE => 'ACTIVE',
- self::UPDATING => 'UPDATING',
- self::DELETING => 'DELETING',
- self::ERROR => 'ERROR',
- ];
-
- 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/DataprocMetastore/src/V1beta/Gapic/DataprocMetastoreFederationGapicClient.php b/DataprocMetastore/src/V1beta/Gapic/DataprocMetastoreFederationGapicClient.php
deleted file mode 100644
index b1bcd9577c54..000000000000
--- a/DataprocMetastore/src/V1beta/Gapic/DataprocMetastoreFederationGapicClient.php
+++ /dev/null
@@ -1,1084 +0,0 @@
-locationName('[PROJECT]', '[LOCATION]');
- * $federationId = 'federation_id';
- * $federation = new Federation();
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'createFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class DataprocMetastoreFederationGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.metastore.v1beta.DataprocMetastoreFederation';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'metastore.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'metastore.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $federationNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/dataproc_metastore_federation_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/dataproc_metastore_federation_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/dataproc_metastore_federation_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/dataproc_metastore_federation_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getFederationNameTemplate()
- {
- if (self::$federationNameTemplate == null) {
- self::$federationNameTemplate = new PathTemplate('projects/{project}/locations/{location}/federations/{federation}');
- }
-
- return self::$federationNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- return self::$locationNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'federation' => self::getFederationNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a federation
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $federation
- *
- * @return string The formatted federation resource.
- *
- * @experimental
- */
- public static function federationName($project, $location, $federation)
- {
- return self::getFederationNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'federation' => $federation,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- *
- * @experimental
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - federation: projects/{project}/locations/{location}/federations/{federation}
- * - location: projects/{project}/locations/{location}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'metastore.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Creates a metastore federation in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedParent = $dataprocMetastoreFederationClient->locationName('[PROJECT]', '[LOCATION]');
- * $federationId = 'federation_id';
- * $federation = new Federation();
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->createFederation($formattedParent, $federationId, $federation);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'createFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param string $federationId Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- *
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @param Federation $federation Required. The Metastore Federation to create. The `name` field is
- * ignored. The ID of the created metastore federation must be
- * provided in the request's `federation_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createFederation($parent, $federationId, $federation, array $optionalArgs = [])
- {
- $request = new CreateFederationRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setFederationId($federationId);
- $request->setFederation($federation);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateFederation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single federation.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedName = $dataprocMetastoreFederationClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- * $operationResponse = $dataprocMetastoreFederationClient->deleteFederation($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->deleteFederation($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'deleteFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore federation to delete,
- * in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteFederation($name, array $optionalArgs = [])
- {
- $request = new DeleteFederationRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteFederation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets the details of a single federation.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedName = $dataprocMetastoreFederationClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- * $response = $dataprocMetastoreFederationClient->getFederation($formattedName);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_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\Metastore\V1beta\Federation
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getFederation($name, array $optionalArgs = [])
- {
- $request = new GetFederationRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetFederation', Federation::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists federations in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $formattedParent = $dataprocMetastoreFederationClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listFederations($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listFederations($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listFederations($parent, array $optionalArgs = [])
- {
- $request = new ListFederationsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListFederations', $optionalArgs, ListFederationsResponse::class, $request);
- }
-
- /**
- * Updates the fields of a federation.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $updateMask = new FieldMask();
- * $federation = new Federation();
- * $operationResponse = $dataprocMetastoreFederationClient->updateFederation($updateMask, $federation);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreFederationClient->updateFederation($updateMask, $federation);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreFederationClient->resumeOperation($operationName, 'updateFederation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param FieldMask $updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @param Federation $federation Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- *
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateFederation($updateMask, $federation, array $optionalArgs = [])
- {
- $request = new UpdateFederationRequest();
- $requestParamHeaders = [];
- $request->setUpdateMask($updateMask);
- $request->setFederation($federation);
- $requestParamHeaders['federation.name'] = $federation->getName();
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateFederation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $response = $dataprocMetastoreFederationClient->getLocation();
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Resource name for the location.
- * @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\Location\Location
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getLocation(array $optionalArgs = [])
- {
- $request = new GetLocationRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listLocations();
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreFederationClient->listLocations();
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * The resource that owns the locations collection, if applicable.
- * @type string $filter
- * The standard list filter.
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listLocations(array $optionalArgs = [])
- {
- $request = new ListLocationsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations');
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $resource = 'resource';
- * $response = $dataprocMetastoreFederationClient->getIamPolicy($resource);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $dataprocMetastoreFederationClient->setIamPolicy($resource, $policy);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreFederationClient = new DataprocMetastoreFederationClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $dataprocMetastoreFederationClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $dataprocMetastoreFederationClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @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\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/DataprocMetastore/src/V1beta/Gapic/DataprocMetastoreGapicClient.php b/DataprocMetastore/src/V1beta/Gapic/DataprocMetastoreGapicClient.php
deleted file mode 100644
index cca473a3794c..000000000000
--- a/DataprocMetastore/src/V1beta/Gapic/DataprocMetastoreGapicClient.php
+++ /dev/null
@@ -1,2408 +0,0 @@
-serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $resourceName = 'resource_name';
- * $locationUri = 'location_uri';
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'alterMetadataResourceLocation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class DataprocMetastoreGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.metastore.v1beta.DataprocMetastore';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'metastore.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'metastore.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $backupNameTemplate;
-
- private static $lakeNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $metadataImportNameTemplate;
-
- private static $networkNameTemplate;
-
- private static $serviceNameTemplate;
-
- private static $subnetworkNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/dataproc_metastore_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/dataproc_metastore_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/dataproc_metastore_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/dataproc_metastore_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getBackupNameTemplate()
- {
- if (self::$backupNameTemplate == null) {
- self::$backupNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}/backups/{backup}');
- }
-
- return self::$backupNameTemplate;
- }
-
- private static function getLakeNameTemplate()
- {
- if (self::$lakeNameTemplate == null) {
- self::$lakeNameTemplate = new PathTemplate('projects/{project}/locations/{location}/lakes/{lake}');
- }
-
- return self::$lakeNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- return self::$locationNameTemplate;
- }
-
- private static function getMetadataImportNameTemplate()
- {
- if (self::$metadataImportNameTemplate == null) {
- self::$metadataImportNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}');
- }
-
- return self::$metadataImportNameTemplate;
- }
-
- private static function getNetworkNameTemplate()
- {
- if (self::$networkNameTemplate == null) {
- self::$networkNameTemplate = new PathTemplate('projects/{project}/global/networks/{network}');
- }
-
- return self::$networkNameTemplate;
- }
-
- private static function getServiceNameTemplate()
- {
- if (self::$serviceNameTemplate == null) {
- self::$serviceNameTemplate = new PathTemplate('projects/{project}/locations/{location}/services/{service}');
- }
-
- return self::$serviceNameTemplate;
- }
-
- private static function getSubnetworkNameTemplate()
- {
- if (self::$subnetworkNameTemplate == null) {
- self::$subnetworkNameTemplate = new PathTemplate('projects/{project}/regions/{region}/subnetworks/{subnetwork}');
- }
-
- return self::$subnetworkNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'backup' => self::getBackupNameTemplate(),
- 'lake' => self::getLakeNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'metadataImport' => self::getMetadataImportNameTemplate(),
- 'network' => self::getNetworkNameTemplate(),
- 'service' => self::getServiceNameTemplate(),
- 'subnetwork' => self::getSubnetworkNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a backup
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $service
- * @param string $backup
- *
- * @return string The formatted backup resource.
- *
- * @experimental
- */
- public static function backupName($project, $location, $service, $backup)
- {
- return self::getBackupNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'service' => $service,
- 'backup' => $backup,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a lake
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $lake
- *
- * @return string The formatted lake resource.
- *
- * @experimental
- */
- public static function lakeName($project, $location, $lake)
- {
- return self::getLakeNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'lake' => $lake,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- *
- * @experimental
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * metadata_import resource.
- *
- * @param string $project
- * @param string $location
- * @param string $service
- * @param string $metadataImport
- *
- * @return string The formatted metadata_import resource.
- *
- * @experimental
- */
- public static function metadataImportName($project, $location, $service, $metadataImport)
- {
- return self::getMetadataImportNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'service' => $service,
- 'metadata_import' => $metadataImport,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a network
- * resource.
- *
- * @param string $project
- * @param string $network
- *
- * @return string The formatted network resource.
- *
- * @experimental
- */
- public static function networkName($project, $network)
- {
- return self::getNetworkNameTemplate()->render([
- 'project' => $project,
- 'network' => $network,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a service
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $service
- *
- * @return string The formatted service resource.
- *
- * @experimental
- */
- public static function serviceName($project, $location, $service)
- {
- return self::getServiceNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'service' => $service,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a subnetwork
- * resource.
- *
- * @param string $project
- * @param string $region
- * @param string $subnetwork
- *
- * @return string The formatted subnetwork resource.
- *
- * @experimental
- */
- public static function subnetworkName($project, $region, $subnetwork)
- {
- return self::getSubnetworkNameTemplate()->render([
- 'project' => $project,
- 'region' => $region,
- 'subnetwork' => $subnetwork,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - backup: projects/{project}/locations/{location}/services/{service}/backups/{backup}
- * - lake: projects/{project}/locations/{location}/lakes/{lake}
- * - location: projects/{project}/locations/{location}
- * - metadataImport: projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}
- * - network: projects/{project}/global/networks/{network}
- * - service: projects/{project}/locations/{location}/services/{service}
- * - subnetwork: projects/{project}/regions/{region}/subnetworks/{subnetwork}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'metastore.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Alter metadata resource location. The metadata resource can be a database,
- * table, or partition. This functionality only updates the parent directory
- * for the respective metadata resource and does not transfer any existing
- * data to the new location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $resourceName = 'resource_name';
- * $locationUri = 'location_uri';
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'alterMetadataResourceLocation');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $resourceName Required. The relative metadata resource name in the following format.
- *
- * `databases/{database_id}`
- * or
- * `databases/{database_id}/tables/{table_id}`
- * or
- * `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- * @param string $locationUri Required. The new location URI for the metadata resource.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function alterMetadataResourceLocation($service, $resourceName, $locationUri, array $optionalArgs = [])
- {
- $request = new AlterMetadataResourceLocationRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setResourceName($resourceName);
- $request->setLocationUri($locationUri);
- $requestParamHeaders['service'] = $service;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('AlterMetadataResourceLocation', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a new backup in a given project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $backupId = 'backup_id';
- * $backup = new Backup();
- * $operationResponse = $dataprocMetastoreClient->createBackup($formattedParent, $backupId, $backup);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->createBackup($formattedParent, $backupId, $backup);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'createBackup');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service in which to create a
- * backup of the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param string $backupId Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- *
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @param Backup $backup Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createBackup($parent, $backupId, $backup, array $optionalArgs = [])
- {
- $request = new CreateBackupRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setBackupId($backupId);
- $request->setBackup($backup);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a new MetadataImport in a given project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $metadataImportId = 'metadata_import_id';
- * $metadataImport = new MetadataImport();
- * $operationResponse = $dataprocMetastoreClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'createMetadataImport');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param string $metadataImportId Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- *
- * This value must be between 1 and 64 characters long, begin with a letter,
- * end with a letter or number, and consist of alpha-numeric ASCII characters
- * or hyphens.
- * @param MetadataImport $metadataImport Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's
- * `metadata_import_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createMetadataImport($parent, $metadataImportId, $metadataImport, array $optionalArgs = [])
- {
- $request = new CreateMetadataImportRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setMetadataImportId($metadataImportId);
- $request->setMetadataImport($metadataImport);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateMetadataImport', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a metastore service in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->locationName('[PROJECT]', '[LOCATION]');
- * $serviceId = 'service_id';
- * $service = new Service();
- * $operationResponse = $dataprocMetastoreClient->createService($formattedParent, $serviceId, $service);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->createService($formattedParent, $serviceId, $service);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'createService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param string $serviceId Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- *
- * This value must be between 2 and 63 characters long inclusive, begin with a
- * letter, end with a letter or number, and consist of alpha-numeric
- * ASCII characters or hyphens.
- * @param Service $service Required. The Metastore service to create. The `name` field is
- * ignored. The ID of the created metastore service must be provided in
- * the request's `service_id` field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createService($parent, $serviceId, $service, array $optionalArgs = [])
- {
- $request = new CreateServiceRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setServiceId($serviceId);
- $request->setService($service);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single backup.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- * $operationResponse = $dataprocMetastoreClient->deleteBackup($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->deleteBackup($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'deleteBackup');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the backup to delete, in the
- * following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteBackup($name, array $optionalArgs = [])
- {
- $request = new DeleteBackupRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteBackup', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes a single service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $operationResponse = $dataprocMetastoreClient->deleteService($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->deleteService($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'deleteService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * // operation succeeded and returns no value
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore service to delete, in
- * the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteService($name, array $optionalArgs = [])
- {
- $request = new DeleteServiceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Exports metadata from a service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $operationResponse = $dataprocMetastoreClient->exportMetadata($formattedService);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->exportMetadata($formattedService);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'exportMetadata');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to run
- * export, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $destinationGcsFolder
- * A Cloud Storage URI of a folder, in the format
- * `gs:///`. A sub-folder
- * `` containing exported files will be created below it.
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @type int $databaseDumpType
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- * For allowed values, use constants defined on {@see \Google\Cloud\Metastore\V1beta\DatabaseDumpSpec\Type}
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function exportMetadata($service, array $optionalArgs = [])
- {
- $request = new ExportMetadataRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $requestParamHeaders['service'] = $service;
- if (isset($optionalArgs['destinationGcsFolder'])) {
- $request->setDestinationGcsFolder($optionalArgs['destinationGcsFolder']);
- }
-
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- if (isset($optionalArgs['databaseDumpType'])) {
- $request->setDatabaseDumpType($optionalArgs['databaseDumpType']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('ExportMetadata', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets details of a single backup.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- * $response = $dataprocMetastoreClient->getBackup($formattedName);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the backup to retrieve, in the
- * following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_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\Metastore\V1beta\Backup
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getBackup($name, array $optionalArgs = [])
- {
- $request = new GetBackupRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetBackup', Backup::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets details of a single import.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->metadataImportName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[METADATA_IMPORT]');
- * $response = $dataprocMetastoreClient->getMetadataImport($formattedName);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_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\Metastore\V1beta\MetadataImport
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getMetadataImport($name, array $optionalArgs = [])
- {
- $request = new GetMetadataImportRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetMetadataImport', MetadataImport::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Gets the details of a single service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedName = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $response = $dataprocMetastoreClient->getService($formattedName);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $name Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_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\Metastore\V1beta\Service
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getService($name, array $optionalArgs = [])
- {
- $request = new GetServiceRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetService', Service::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists backups in a service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listBackups($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listBackups($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service whose backups to
- * list, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listBackups($parent, array $optionalArgs = [])
- {
- $request = new ListBackupsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request);
- }
-
- /**
- * Lists imports in a service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listMetadataImports($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listMetadataImports($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listMetadataImports($parent, array $optionalArgs = [])
- {
- $request = new ListMetadataImportsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListMetadataImports', $optionalArgs, ListMetadataImportsResponse::class, $request);
- }
-
- /**
- * Lists services in a project and location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedParent = $dataprocMetastoreClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listServices($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listServices($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $orderBy
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listServices($parent, array $optionalArgs = [])
- {
- $request = new ListServicesRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['orderBy'])) {
- $request->setOrderBy($optionalArgs['orderBy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListServices', $optionalArgs, ListServicesResponse::class, $request);
- }
-
- /**
- * Move a table to another database.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $tableName = 'table_name';
- * $dbName = 'db_name';
- * $destinationDbName = 'destination_db_name';
- * $operationResponse = $dataprocMetastoreClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'moveTableToDatabase');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $tableName Required. The name of the table to be moved.
- * @param string $dbName Required. The name of the database where the table resides.
- * @param string $destinationDbName Required. The name of the database where the table should be moved.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function moveTableToDatabase($service, $tableName, $dbName, $destinationDbName, array $optionalArgs = [])
- {
- $request = new MoveTableToDatabaseRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setTableName($tableName);
- $request->setDbName($dbName);
- $request->setDestinationDbName($destinationDbName);
- $requestParamHeaders['service'] = $service;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('MoveTableToDatabase', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Query DPMS metadata.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $query = 'query';
- * $operationResponse = $dataprocMetastoreClient->queryMetadata($formattedService, $query);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->queryMetadata($formattedService, $query);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'queryMetadata');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $query Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function queryMetadata($service, $query, array $optionalArgs = [])
- {
- $request = new QueryMetadataRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setQuery($query);
- $requestParamHeaders['service'] = $service;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('QueryMetadata', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Removes the attached IAM policies for a resource
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $response = $dataprocMetastoreClient->removeIamPolicy($resource);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $asynchronous
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- * @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\Metastore\V1beta\RemoveIamPolicyResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function removeIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new RemoveIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['asynchronous'])) {
- $request->setAsynchronous($optionalArgs['asynchronous']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('RemoveIamPolicy', RemoveIamPolicyResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Restores a service from a backup.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $formattedService = $dataprocMetastoreClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- * $formattedBackup = $dataprocMetastoreClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- * $operationResponse = $dataprocMetastoreClient->restoreService($formattedService, $formattedBackup);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->restoreService($formattedService, $formattedBackup);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'restoreService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $service Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param string $backup Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $restoreType
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- * For allowed values, use constants defined on {@see \Google\Cloud\Metastore\V1beta\Restore\RestoreType}
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function restoreService($service, $backup, array $optionalArgs = [])
- {
- $request = new RestoreServiceRequest();
- $requestParamHeaders = [];
- $request->setService($service);
- $request->setBackup($backup);
- $requestParamHeaders['service'] = $service;
- if (isset($optionalArgs['restoreType'])) {
- $request->setRestoreType($optionalArgs['restoreType']);
- }
-
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('RestoreService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates a single import.
- * Only the description field of MetadataImport is supported to be updated.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $updateMask = new FieldMask();
- * $metadataImport = new MetadataImport();
- * $operationResponse = $dataprocMetastoreClient->updateMetadataImport($updateMask, $metadataImport);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->updateMetadataImport($updateMask, $metadataImport);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'updateMetadataImport');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param FieldMask $updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @param MetadataImport $metadataImport Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- *
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateMetadataImport($updateMask, $metadataImport, array $optionalArgs = [])
- {
- $request = new UpdateMetadataImportRequest();
- $requestParamHeaders = [];
- $request->setUpdateMask($updateMask);
- $request->setMetadataImport($metadataImport);
- $requestParamHeaders['metadata_import.name'] = $metadataImport->getName();
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateMetadataImport', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the parameters of a single service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $updateMask = new FieldMask();
- * $service = new Service();
- * $operationResponse = $dataprocMetastoreClient->updateService($updateMask, $service);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $dataprocMetastoreClient->updateService($updateMask, $service);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $dataprocMetastoreClient->resumeOperation($operationName, 'updateService');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param FieldMask $updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @param Service $service Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- *
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $requestId
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- *
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- *
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * @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\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateService($updateMask, $service, array $optionalArgs = [])
- {
- $request = new UpdateServiceRequest();
- $requestParamHeaders = [];
- $request->setUpdateMask($updateMask);
- $request->setService($service);
- $requestParamHeaders['service.name'] = $service->getName();
- if (isset($optionalArgs['requestId'])) {
- $request->setRequestId($optionalArgs['requestId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateService', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $response = $dataprocMetastoreClient->getLocation();
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Resource name for the location.
- * @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\Location\Location
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getLocation(array $optionalArgs = [])
- {
- $request = new GetLocationRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * // Iterate over pages of elements
- * $pagedResponse = $dataprocMetastoreClient->listLocations();
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $dataprocMetastoreClient->listLocations();
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * The resource that owns the locations collection, if applicable.
- * @type string $filter
- * The standard list filter.
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @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\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listLocations(array $optionalArgs = [])
- {
- $request = new ListLocationsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations');
- }
-
- /**
- * Gets the access control policy for a resource. Returns an empty policy
- if the resource exists and does not have a policy set.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $response = $dataprocMetastoreClient->getIamPolicy($resource);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type GetPolicyOptions $options
- * OPTIONAL: A `GetPolicyOptions` object for specifying options to
- * `GetIamPolicy`.
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getIamPolicy($resource, array $optionalArgs = [])
- {
- $request = new GetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['options'])) {
- $request->setOptions($optionalArgs['options']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Sets the access control policy on the specified resource. Replaces
- any existing policy.
-
- Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
- errors.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $policy = new Policy();
- * $response = $dataprocMetastoreClient->setIamPolicy($resource, $policy);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy is being specified.
- * See the operation documentation for the appropriate value for this field.
- * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of
- * the policy is limited to a few 10s of KB. An empty policy is a
- * valid policy but certain Cloud Platform services (such as Projects)
- * might reject them.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
- * the fields in the mask will be modified. If no mask is provided, the
- * following default mask is used:
- *
- * `paths: "bindings, etag"`
- * @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\Iam\V1\Policy
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function setIamPolicy($resource, $policy, array $optionalArgs = [])
- {
- $request = new SetIamPolicyRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPolicy($policy);
- $requestParamHeaders['resource'] = $resource;
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-
- /**
- * Returns permissions that a caller has on the specified resource. If the
- resource does not exist, this will return an empty set of
- permissions, not a `NOT_FOUND` error.
-
- Note: This operation is designed to be used for building
- permission-aware UIs and command-line tools, not for authorization
- checking. This operation may "fail open" without warning.
- *
- * Sample code:
- * ```
- * $dataprocMetastoreClient = new DataprocMetastoreClient();
- * try {
- * $resource = 'resource';
- * $permissions = [];
- * $response = $dataprocMetastoreClient->testIamPermissions($resource, $permissions);
- * } finally {
- * $dataprocMetastoreClient->close();
- * }
- * ```
- *
- * @param string $resource REQUIRED: The resource for which the policy detail is being requested.
- * See the operation documentation for the appropriate value for this field.
- * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with
- * wildcards (such as '*' or 'storage.*') are not allowed. For more
- * information see
- * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
- * @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\Iam\V1\TestIamPermissionsResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function testIamPermissions($resource, $permissions, array $optionalArgs = [])
- {
- $request = new TestIamPermissionsRequest();
- $requestParamHeaders = [];
- $request->setResource($resource);
- $request->setPermissions($permissions);
- $requestParamHeaders['resource'] = $resource;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait();
- }
-}
diff --git a/DataprocMetastore/src/V1beta/GetBackupRequest.php b/DataprocMetastore/src/V1beta/GetBackupRequest.php
deleted file mode 100644
index a3e383f0ede8..000000000000
--- a/DataprocMetastore/src/V1beta/GetBackupRequest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.GetBackupRequest
- */
-class GetBackupRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the backup to retrieve, in the
- * following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/GetFederationRequest.php b/DataprocMetastore/src/V1beta/GetFederationRequest.php
deleted file mode 100644
index d37137df1cc1..000000000000
--- a/DataprocMetastore/src/V1beta/GetFederationRequest.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1beta.GetFederationRequest
- */
-class GetFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore federation to
- * retrieve, in the following form:
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/GetMetadataImportRequest.php b/DataprocMetastore/src/V1beta/GetMetadataImportRequest.php
deleted file mode 100644
index f68832aaeee1..000000000000
--- a/DataprocMetastore/src/V1beta/GetMetadataImportRequest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.GetMetadataImportRequest
- */
-class GetMetadataImportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metadata import to retrieve, in
- * the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/GetServiceRequest.php b/DataprocMetastore/src/V1beta/GetServiceRequest.php
deleted file mode 100644
index 3b061125d7b9..000000000000
--- a/DataprocMetastore/src/V1beta/GetServiceRequest.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.GetServiceRequest
- */
-class GetServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The relative resource name of the metastore service to retrieve,
- * in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/HiveMetastoreConfig.php b/DataprocMetastore/src/V1beta/HiveMetastoreConfig.php
deleted file mode 100644
index b04e639ad22d..000000000000
--- a/DataprocMetastore/src/V1beta/HiveMetastoreConfig.php
+++ /dev/null
@@ -1,278 +0,0 @@
-google.cloud.metastore.v1beta.HiveMetastoreConfig
- */
-class HiveMetastoreConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The Hive metastore schema version.
- *
- * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $version = '';
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- *
- * Generated from protobuf field map config_overrides = 2;
- */
- private $config_overrides;
- /**
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3;
- */
- protected $kerberos_config = null;
- /**
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4;
- */
- protected $endpoint_protocol = 0;
- /**
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- *
- * Generated from protobuf field map auxiliary_versions = 5;
- */
- private $auxiliary_versions;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $version
- * Immutable. The Hive metastore schema version.
- * @type array|\Google\Protobuf\Internal\MapField $config_overrides
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- * @type \Google\Cloud\Metastore\V1beta\KerberosConfig $kerberos_config
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- * @type int $endpoint_protocol
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- * @type array|\Google\Protobuf\Internal\MapField $auxiliary_versions
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The Hive metastore schema version.
- *
- * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Immutable. The Hive metastore schema version.
- *
- * Generated from protobuf field string version = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getConfigOverrides()
- {
- return $this->config_overrides;
- }
-
- /**
- * A mapping of Hive metastore configuration key-value pairs to apply to the
- * Hive metastore (configured in `hive-site.xml`). The mappings
- * override system defaults (some keys cannot be overridden). These
- * overrides are also applied to auxiliary versions and can be further
- * customized in the auxiliary version's `AuxiliaryVersionConfig`.
- *
- * Generated from protobuf field map config_overrides = 2;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setConfigOverrides($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->config_overrides = $arr;
-
- return $this;
- }
-
- /**
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3;
- * @return \Google\Cloud\Metastore\V1beta\KerberosConfig|null
- */
- public function getKerberosConfig()
- {
- return $this->kerberos_config;
- }
-
- public function hasKerberosConfig()
- {
- return isset($this->kerberos_config);
- }
-
- public function clearKerberosConfig()
- {
- unset($this->kerberos_config);
- }
-
- /**
- * Information used to configure the Hive metastore service as a service
- * principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
- * method and specify this field's path
- * (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
- * while omitting this field from the request's `service`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.KerberosConfig kerberos_config = 3;
- * @param \Google\Cloud\Metastore\V1beta\KerberosConfig $var
- * @return $this
- */
- public function setKerberosConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\KerberosConfig::class);
- $this->kerberos_config = $var;
-
- return $this;
- }
-
- /**
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4;
- * @return int
- */
- public function getEndpointProtocol()
- {
- return $this->endpoint_protocol;
- }
-
- /**
- * The protocol to use for the metastore service endpoint. If unspecified,
- * defaults to `THRIFT`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol endpoint_protocol = 4;
- * @param int $var
- * @return $this
- */
- public function setEndpointProtocol($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\HiveMetastoreConfig\EndpointProtocol::class);
- $this->endpoint_protocol = $var;
-
- return $this;
- }
-
- /**
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- *
- * Generated from protobuf field map auxiliary_versions = 5;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAuxiliaryVersions()
- {
- return $this->auxiliary_versions;
- }
-
- /**
- * A mapping of Hive metastore version to the auxiliary version
- * configuration. When specified, a secondary Hive metastore service is
- * created along with the primary service. All auxiliary versions must be less
- * than the service's primary version. The key is the auxiliary service name
- * and it must match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. This
- * means that the first character must be a lowercase letter, and all the
- * following characters must be hyphens, lowercase letters, or digits, except
- * the last character, which cannot be a hyphen.
- *
- * Generated from protobuf field map auxiliary_versions = 5;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAuxiliaryVersions($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\AuxiliaryVersionConfig::class);
- $this->auxiliary_versions = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/HiveMetastoreConfig/EndpointProtocol.php b/DataprocMetastore/src/V1beta/HiveMetastoreConfig/EndpointProtocol.php
deleted file mode 100644
index 550e109513b3..000000000000
--- a/DataprocMetastore/src/V1beta/HiveMetastoreConfig/EndpointProtocol.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1beta.HiveMetastoreConfig.EndpointProtocol
- */
-class EndpointProtocol
-{
- /**
- * The protocol is not set.
- *
- * Generated from protobuf enum ENDPOINT_PROTOCOL_UNSPECIFIED = 0;
- */
- const ENDPOINT_PROTOCOL_UNSPECIFIED = 0;
- /**
- * Use the legacy Apache Thrift protocol for the metastore service endpoint.
- *
- * Generated from protobuf enum THRIFT = 1;
- */
- const THRIFT = 1;
- /**
- * Use the modernized gRPC protocol for the metastore service endpoint.
- *
- * Generated from protobuf enum GRPC = 2;
- */
- const GRPC = 2;
-
- private static $valueToName = [
- self::ENDPOINT_PROTOCOL_UNSPECIFIED => 'ENDPOINT_PROTOCOL_UNSPECIFIED',
- self::THRIFT => 'THRIFT',
- self::GRPC => 'GRPC',
- ];
-
- 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/DataprocMetastore/src/V1beta/KerberosConfig.php b/DataprocMetastore/src/V1beta/KerberosConfig.php
deleted file mode 100644
index b2f2766907f1..000000000000
--- a/DataprocMetastore/src/V1beta/KerberosConfig.php
+++ /dev/null
@@ -1,165 +0,0 @@
-google.cloud.metastore.v1beta.KerberosConfig
- */
-class KerberosConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Secret keytab = 1;
- */
- protected $keytab = null;
- /**
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- *
- * Generated from protobuf field string principal = 2;
- */
- protected $principal = '';
- /**
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- *
- * Generated from protobuf field string krb5_config_gcs_uri = 3;
- */
- protected $krb5_config_gcs_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1beta\Secret $keytab
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- * @type string $principal
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- * @type string $krb5_config_gcs_uri
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Secret keytab = 1;
- * @return \Google\Cloud\Metastore\V1beta\Secret|null
- */
- public function getKeytab()
- {
- return $this->keytab;
- }
-
- public function hasKeytab()
- {
- return isset($this->keytab);
- }
-
- public function clearKeytab()
- {
- unset($this->keytab);
- }
-
- /**
- * A Kerberos keytab file that can be used to authenticate a service principal
- * with a Kerberos Key Distribution Center (KDC).
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Secret keytab = 1;
- * @param \Google\Cloud\Metastore\V1beta\Secret $var
- * @return $this
- */
- public function setKeytab($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Secret::class);
- $this->keytab = $var;
-
- return $this;
- }
-
- /**
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- *
- * Generated from protobuf field string principal = 2;
- * @return string
- */
- public function getPrincipal()
- {
- return $this->principal;
- }
-
- /**
- * A Kerberos principal that exists in the both the keytab the KDC
- * to authenticate as. A typical principal is of the form
- * `primary/instance@REALM`, but there is no exact format.
- *
- * Generated from protobuf field string principal = 2;
- * @param string $var
- * @return $this
- */
- public function setPrincipal($var)
- {
- GPBUtil::checkString($var, True);
- $this->principal = $var;
-
- return $this;
- }
-
- /**
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- *
- * Generated from protobuf field string krb5_config_gcs_uri = 3;
- * @return string
- */
- public function getKrb5ConfigGcsUri()
- {
- return $this->krb5_config_gcs_uri;
- }
-
- /**
- * A Cloud Storage URI that specifies the path to a
- * krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
- * although the file does not need to be named krb5.conf explicitly.
- *
- * Generated from protobuf field string krb5_config_gcs_uri = 3;
- * @param string $var
- * @return $this
- */
- public function setKrb5ConfigGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->krb5_config_gcs_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Lake.php b/DataprocMetastore/src/V1beta/Lake.php
deleted file mode 100644
index 62cb12726e69..000000000000
--- a/DataprocMetastore/src/V1beta/Lake.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1beta.Lake
- */
-class Lake extends \Google\Protobuf\Internal\Message
-{
- /**
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The Lake resource name.
- * Example:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListBackupsRequest.php b/DataprocMetastore/src/V1beta/ListBackupsRequest.php
deleted file mode 100644
index 36886d02c938..000000000000
--- a/DataprocMetastore/src/V1beta/ListBackupsRequest.php
+++ /dev/null
@@ -1,252 +0,0 @@
-google.cloud.metastore.v1beta.ListBackupsRequest
- */
-class ListBackupsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- * @type int $page_size
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service whose backups to
- * list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of backups to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 backups are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListBackups][google.cloud.metastore.v1beta.DataprocMetastore.ListBackups]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListBackupsResponse.php b/DataprocMetastore/src/V1beta/ListBackupsResponse.php
deleted file mode 100644
index a28503a594af..000000000000
--- a/DataprocMetastore/src/V1beta/ListBackupsResponse.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.metastore.v1beta.ListBackupsResponse
- */
-class ListBackupsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The backups of the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Backup backups = 1;
- */
- private $backups;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\Backup>|\Google\Protobuf\Internal\RepeatedField $backups
- * The backups of the specified service.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The backups of the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Backup backups = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getBackups()
- {
- return $this->backups;
- }
-
- /**
- * The backups of the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Backup backups = 1;
- * @param array<\Google\Cloud\Metastore\V1beta\Backup>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setBackups($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\Backup::class);
- $this->backups = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListFederationsRequest.php b/DataprocMetastore/src/V1beta/ListFederationsRequest.php
deleted file mode 100644
index cd49d1a0f5c2..000000000000
--- a/DataprocMetastore/src/V1beta/ListFederationsRequest.php
+++ /dev/null
@@ -1,251 +0,0 @@
-google.cloud.metastore.v1beta.ListFederationsRequest
- */
-class ListFederationsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type int $page_size
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location of metastore
- * federations to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of federations to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous ListFederationServices
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * ListFederationServices must match the call that provided the
- * page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListFederationsResponse.php b/DataprocMetastore/src/V1beta/ListFederationsResponse.php
deleted file mode 100644
index c3e522aedae4..000000000000
--- a/DataprocMetastore/src/V1beta/ListFederationsResponse.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.metastore.v1beta.ListFederationsResponse
- */
-class ListFederationsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Federation federations = 1;
- */
- private $federations;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\Federation>|\Google\Protobuf\Internal\RepeatedField $federations
- * The services in the specified location.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Federation federations = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getFederations()
- {
- return $this->federations;
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Federation federations = 1;
- * @param array<\Google\Cloud\Metastore\V1beta\Federation>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setFederations($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\Federation::class);
- $this->federations = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListMetadataImportsRequest.php b/DataprocMetastore/src/V1beta/ListMetadataImportsRequest.php
deleted file mode 100644
index 63bb5ae4dbc7..000000000000
--- a/DataprocMetastore/src/V1beta/ListMetadataImportsRequest.php
+++ /dev/null
@@ -1,252 +0,0 @@
-google.cloud.metastore.v1beta.ListMetadataImportsRequest
- */
-class ListMetadataImportsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- * @type int $page_size
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the service whose metadata imports
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of imports to return. The response may contain
- * less than the maximum number. If unspecified, no more than 500 imports are
- * returned. The maximum value is 1000; values above 1000 are changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListMetadataImportsResponse.php b/DataprocMetastore/src/V1beta/ListMetadataImportsResponse.php
deleted file mode 100644
index 3185137d31b9..000000000000
--- a/DataprocMetastore/src/V1beta/ListMetadataImportsResponse.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.metastore.v1beta.ListMetadataImportsResponse
- */
-class ListMetadataImportsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The imports in the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1;
- */
- private $metadata_imports;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\MetadataImport>|\Google\Protobuf\Internal\RepeatedField $metadata_imports
- * The imports in the specified service.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The imports in the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetadataImports()
- {
- return $this->metadata_imports;
- }
-
- /**
- * The imports in the specified service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.MetadataImport metadata_imports = 1;
- * @param array<\Google\Cloud\Metastore\V1beta\MetadataImport>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetadataImports($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\MetadataImport::class);
- $this->metadata_imports = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListServicesRequest.php b/DataprocMetastore/src/V1beta/ListServicesRequest.php
deleted file mode 100644
index 3ad5134d65c1..000000000000
--- a/DataprocMetastore/src/V1beta/ListServicesRequest.php
+++ /dev/null
@@ -1,256 +0,0 @@
-google.cloud.metastore.v1beta.ListServicesRequest
- */
-class ListServicesRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_size = 0;
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $page_token = '';
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $filter = '';
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $order_by = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- * @type int $page_size
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- * @type string $page_token
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- * @type string $filter
- * Optional. The filter to apply to list results.
- * @type string $order_by
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The relative resource name of the location of metastore services
- * to list, in the following form:
- * `projects/{project_number}/locations/{location_id}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Optional. The maximum number of services to return. The response may
- * contain less than the maximum number. If unspecified, no more than 500
- * services are returned. The maximum value is 1000; values above 1000 are
- * changed to 1000.
- *
- * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * Optional. A page token, received from a previous
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * call. Provide this token to retrieve the subsequent page.
- * To retrieve the first page, supply an empty page token.
- * When paginating, other parameters provided to
- * [DataprocMetastore.ListServices][google.cloud.metastore.v1beta.DataprocMetastore.ListServices]
- * must match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getFilter()
- {
- return $this->filter;
- }
-
- /**
- * Optional. The filter to apply to list results.
- *
- * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setFilter($var)
- {
- GPBUtil::checkString($var, True);
- $this->filter = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getOrderBy()
- {
- return $this->order_by;
- }
-
- /**
- * Optional. Specify the ordering of results as described in [Sorting
- * Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
- * If not specified, the results will be sorted in the default order.
- *
- * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setOrderBy($var)
- {
- GPBUtil::checkString($var, True);
- $this->order_by = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ListServicesResponse.php b/DataprocMetastore/src/V1beta/ListServicesResponse.php
deleted file mode 100644
index b37cb04836b5..000000000000
--- a/DataprocMetastore/src/V1beta/ListServicesResponse.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.metastore.v1beta.ListServicesResponse
- */
-class ListServicesResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Service services = 1;
- */
- private $services;
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- */
- private $unreachable;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\Service>|\Google\Protobuf\Internal\RepeatedField $services
- * The services in the specified location.
- * @type string $next_page_token
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable
- * Locations that could not be reached.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Service services = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getServices()
- {
- return $this->services;
- }
-
- /**
- * The services in the specified location.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Service services = 1;
- * @param array<\Google\Cloud\Metastore\V1beta\Service>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setServices($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\Service::class);
- $this->services = $arr;
-
- return $this;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token that can be sent as `page_token` to retrieve the next page. If this
- * field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getUnreachable()
- {
- return $this->unreachable;
- }
-
- /**
- * Locations that could not be reached.
- *
- * Generated from protobuf field repeated string unreachable = 3;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setUnreachable($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->unreachable = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/LocationMetadata.php b/DataprocMetastore/src/V1beta/LocationMetadata.php
deleted file mode 100644
index 2399c3c3e4ec..000000000000
--- a/DataprocMetastore/src/V1beta/LocationMetadata.php
+++ /dev/null
@@ -1,75 +0,0 @@
-google.cloud.metastore.v1beta.LocationMetadata
- */
-class LocationMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1;
- */
- private $supported_hive_metastore_versions;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\LocationMetadata\HiveMetastoreVersion>|\Google\Protobuf\Internal\RepeatedField $supported_hive_metastore_versions
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSupportedHiveMetastoreVersions()
- {
- return $this->supported_hive_metastore_versions;
- }
-
- /**
- * The versions of Hive Metastore that can be used when creating a new
- * metastore service in this location. The server guarantees that exactly one
- * `HiveMetastoreVersion` in the list will set `is_default`.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion supported_hive_metastore_versions = 1;
- * @param array<\Google\Cloud\Metastore\V1beta\LocationMetadata\HiveMetastoreVersion>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSupportedHiveMetastoreVersions($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\LocationMetadata\HiveMetastoreVersion::class);
- $this->supported_hive_metastore_versions = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/LocationMetadata/HiveMetastoreVersion.php b/DataprocMetastore/src/V1beta/LocationMetadata/HiveMetastoreVersion.php
deleted file mode 100644
index 63ce18c839d9..000000000000
--- a/DataprocMetastore/src/V1beta/LocationMetadata/HiveMetastoreVersion.php
+++ /dev/null
@@ -1,106 +0,0 @@
-google.cloud.metastore.v1beta.LocationMetadata.HiveMetastoreVersion
- */
-class HiveMetastoreVersion extends \Google\Protobuf\Internal\Message
-{
- /**
- * The semantic version of the Hive Metastore software.
- *
- * Generated from protobuf field string version = 1;
- */
- protected $version = '';
- /**
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- *
- * Generated from protobuf field bool is_default = 2;
- */
- protected $is_default = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $version
- * The semantic version of the Hive Metastore software.
- * @type bool $is_default
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The semantic version of the Hive Metastore software.
- *
- * Generated from protobuf field string version = 1;
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * The semantic version of the Hive Metastore software.
- *
- * Generated from protobuf field string version = 1;
- * @param string $var
- * @return $this
- */
- public function setVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->version = $var;
-
- return $this;
- }
-
- /**
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- *
- * Generated from protobuf field bool is_default = 2;
- * @return bool
- */
- public function getIsDefault()
- {
- return $this->is_default;
- }
-
- /**
- * Whether `version` will be chosen by the server if a metastore service is
- * created with a `HiveMetastoreConfig` that omits the `version`.
- *
- * Generated from protobuf field bool is_default = 2;
- * @param bool $var
- * @return $this
- */
- public function setIsDefault($var)
- {
- GPBUtil::checkBool($var);
- $this->is_default = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/DataprocMetastore/src/V1beta/MaintenanceWindow.php b/DataprocMetastore/src/V1beta/MaintenanceWindow.php
deleted file mode 100644
index 0fde87bf554d..000000000000
--- a/DataprocMetastore/src/V1beta/MaintenanceWindow.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.metastore.v1beta.MaintenanceWindow
- */
-class MaintenanceWindow extends \Google\Protobuf\Internal\Message
-{
- /**
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- */
- protected $hour_of_day = null;
- /**
- * The day of week, when the window starts.
- *
- * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2;
- */
- protected $day_of_week = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Int32Value $hour_of_day
- * The hour of day (0-23) when the window starts.
- * @type int $day_of_week
- * The day of week, when the window starts.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @return \Google\Protobuf\Int32Value|null
- */
- public function getHourOfDay()
- {
- return $this->hour_of_day;
- }
-
- public function hasHourOfDay()
- {
- return isset($this->hour_of_day);
- }
-
- public function clearHourOfDay()
- {
- unset($this->hour_of_day);
- }
-
- /**
- * Returns the unboxed value from getHourOfDay()
-
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @return int|null
- */
- public function getHourOfDayUnwrapped()
- {
- return $this->readWrapperValue("hour_of_day");
- }
-
- /**
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @param \Google\Protobuf\Int32Value $var
- * @return $this
- */
- public function setHourOfDay($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
- $this->hour_of_day = $var;
-
- return $this;
- }
-
- /**
- * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
-
- * The hour of day (0-23) when the window starts.
- *
- * Generated from protobuf field .google.protobuf.Int32Value hour_of_day = 1;
- * @param int|null $var
- * @return $this
- */
- public function setHourOfDayUnwrapped($var)
- {
- $this->writeWrapperValue("hour_of_day", $var);
- return $this;}
-
- /**
- * The day of week, when the window starts.
- *
- * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2;
- * @return int
- */
- public function getDayOfWeek()
- {
- return $this->day_of_week;
- }
-
- /**
- * The day of week, when the window starts.
- *
- * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2;
- * @param int $var
- * @return $this
- */
- public function setDayOfWeek($var)
- {
- GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class);
- $this->day_of_week = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/MetadataExport.php b/DataprocMetastore/src/V1beta/MetadataExport.php
deleted file mode 100644
index 08d2d19f3979..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataExport.php
+++ /dev/null
@@ -1,240 +0,0 @@
-google.cloud.metastore.v1beta.MetadataExport
- */
-class MetadataExport extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The time when the export started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $start_time = null;
- /**
- * Output only. The time when the export ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the export.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. The type of the database dump.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $database_dump_type = 0;
- protected $destination;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $destination_gcs_uri
- * Output only. A Cloud Storage URI of a folder that metadata are exported
- * to, in the form of
- * `gs:////`, where
- * `` is automatically generated.
- * @type \Google\Protobuf\Timestamp $start_time
- * Output only. The time when the export started.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the export ended.
- * @type int $state
- * Output only. The current state of the export.
- * @type int $database_dump_type
- * Output only. The type of the database dump.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. A Cloud Storage URI of a folder that metadata are exported
- * to, in the form of
- * `gs:////`, where
- * `` is automatically generated.
- *
- * Generated from protobuf field string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getDestinationGcsUri()
- {
- return $this->readOneof(4);
- }
-
- public function hasDestinationGcsUri()
- {
- return $this->hasOneof(4);
- }
-
- /**
- * Output only. A Cloud Storage URI of a folder that metadata are exported
- * to, in the form of
- * `gs:////`, where
- * `` is automatically generated.
- *
- * Generated from protobuf field string destination_gcs_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setDestinationGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(4, $var);
-
- return $this;
- }
-
- /**
- * Output only. The time when the export started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Output only. The time when the export started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the export ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the export ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the export.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the export.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataExport.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\MetadataExport\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. The type of the database dump.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getDatabaseDumpType()
- {
- return $this->database_dump_type;
- }
-
- /**
- * Output only. The type of the database dump.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type database_dump_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setDatabaseDumpType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\DatabaseDumpSpec\Type::class);
- $this->database_dump_type = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getDestination()
- {
- return $this->whichOneof("destination");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/MetadataExport/State.php b/DataprocMetastore/src/V1beta/MetadataExport/State.php
deleted file mode 100644
index facfccdf67cf..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataExport/State.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.MetadataExport.State
- */
-class State
-{
- /**
- * The state of the metadata export is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metadata export is running.
- *
- * Generated from protobuf enum RUNNING = 1;
- */
- const RUNNING = 1;
- /**
- * The metadata export completed successfully.
- *
- * Generated from protobuf enum SUCCEEDED = 2;
- */
- const SUCCEEDED = 2;
- /**
- * The metadata export failed.
- *
- * Generated from protobuf enum FAILED = 3;
- */
- const FAILED = 3;
- /**
- * The metadata export is cancelled.
- *
- * Generated from protobuf enum CANCELLED = 4;
- */
- const CANCELLED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::RUNNING => 'RUNNING',
- self::SUCCEEDED => 'SUCCEEDED',
- self::FAILED => 'FAILED',
- self::CANCELLED => 'CANCELLED',
- ];
-
- 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/DataprocMetastore/src/V1beta/MetadataImport.php b/DataprocMetastore/src/V1beta/MetadataImport.php
deleted file mode 100644
index 1baa14288a20..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataImport.php
+++ /dev/null
@@ -1,313 +0,0 @@
-google.cloud.metastore.v1beta.MetadataImport
- */
-class MetadataImport extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * The description of the metadata import.
- *
- * Generated from protobuf field string description = 2;
- */
- protected $description = '';
- /**
- * Output only. The time when the metadata import was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the metadata import was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * Output only. The time when the metadata import finished.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the metadata import.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- protected $metadata;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1beta\MetadataImport\DatabaseDump $database_dump
- * Immutable. A database dump from a pre-existing metastore's database.
- * @type string $name
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- * @type string $description
- * The description of the metadata import.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the metadata import was started.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The time when the metadata import was last updated.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the metadata import finished.
- * @type int $state
- * Output only. The current state of the metadata import.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. A database dump from a pre-existing metastore's database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE];
- * @return \Google\Cloud\Metastore\V1beta\MetadataImport\DatabaseDump|null
- */
- public function getDatabaseDump()
- {
- return $this->readOneof(6);
- }
-
- public function hasDatabaseDump()
- {
- return $this->hasOneof(6);
- }
-
- /**
- * Immutable. A database dump from a pre-existing metastore's database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump database_dump = 6 [(.google.api.field_behavior) = IMMUTABLE];
- * @param \Google\Cloud\Metastore\V1beta\MetadataImport\DatabaseDump $var
- * @return $this
- */
- public function setDatabaseDump($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\MetadataImport\DatabaseDump::class);
- $this->writeOneof(6, $var);
-
- return $this;
- }
-
- /**
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the metadata import, of the form:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * The description of the metadata import.
- *
- * Generated from protobuf field string description = 2;
- * @return string
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * The description of the metadata import.
- *
- * Generated from protobuf field string description = 2;
- * @param string $var
- * @return $this
- */
- public function setDescription($var)
- {
- GPBUtil::checkString($var, True);
- $this->description = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metadata import was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the metadata import was started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metadata import was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The time when the metadata import was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metadata import finished.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the metadata import finished.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the metadata import.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the metadata import.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\MetadataImport\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getMetadata()
- {
- return $this->whichOneof("metadata");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/MetadataImport/DatabaseDump.php b/DataprocMetastore/src/V1beta/MetadataImport/DatabaseDump.php
deleted file mode 100644
index a82ff9735aa6..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataImport/DatabaseDump.php
+++ /dev/null
@@ -1,189 +0,0 @@
-google.cloud.metastore.v1beta.MetadataImport.DatabaseDump
- */
-class DatabaseDump extends \Google\Protobuf\Internal\Message
-{
- /**
- * The type of the database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];
- * @deprecated
- */
- protected $database_type = 0;
- /**
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- *
- * Generated from protobuf field string gcs_uri = 2;
- */
- protected $gcs_uri = '';
- /**
- * The name of the source database.
- *
- * Generated from protobuf field string source_database = 3 [deprecated = true];
- * @deprecated
- */
- protected $source_database = '';
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $type = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $database_type
- * The type of the database.
- * @type string $gcs_uri
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- * @type string $source_database
- * The name of the source database.
- * @type int $type
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The type of the database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];
- * @return int
- * @deprecated
- */
- public function getDatabaseType()
- {
- @trigger_error('database_type is deprecated.', E_USER_DEPRECATED);
- return $this->database_type;
- }
-
- /**
- * The type of the database.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];
- * @param int $var
- * @return $this
- * @deprecated
- */
- public function setDatabaseType($var)
- {
- @trigger_error('database_type is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\MetadataImport\DatabaseDump\DatabaseType::class);
- $this->database_type = $var;
-
- return $this;
- }
-
- /**
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- *
- * Generated from protobuf field string gcs_uri = 2;
- * @return string
- */
- public function getGcsUri()
- {
- return $this->gcs_uri;
- }
-
- /**
- * A Cloud Storage object or folder URI that specifies the source from which
- * to import metadata. It must begin with `gs://`.
- *
- * Generated from protobuf field string gcs_uri = 2;
- * @param string $var
- * @return $this
- */
- public function setGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->gcs_uri = $var;
-
- return $this;
- }
-
- /**
- * The name of the source database.
- *
- * Generated from protobuf field string source_database = 3 [deprecated = true];
- * @return string
- * @deprecated
- */
- public function getSourceDatabase()
- {
- @trigger_error('source_database is deprecated.', E_USER_DEPRECATED);
- return $this->source_database;
- }
-
- /**
- * The name of the source database.
- *
- * Generated from protobuf field string source_database = 3 [deprecated = true];
- * @param string $var
- * @return $this
- * @deprecated
- */
- public function setSourceDatabase($var)
- {
- @trigger_error('source_database is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkString($var, True);
- $this->source_database = $var;
-
- return $this;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Optional. The type of the database dump. If unspecified, defaults to
- * `MYSQL`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\DatabaseDumpSpec\Type::class);
- $this->type = $var;
-
- return $this;
- }
-
-}
-
-
diff --git a/DataprocMetastore/src/V1beta/MetadataImport/DatabaseDump/DatabaseType.php b/DataprocMetastore/src/V1beta/MetadataImport/DatabaseDump/DatabaseType.php
deleted file mode 100644
index 6dc32a9d28ce..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataImport/DatabaseDump/DatabaseType.php
+++ /dev/null
@@ -1,55 +0,0 @@
-google.cloud.metastore.v1beta.MetadataImport.DatabaseDump.DatabaseType
- */
-class DatabaseType
-{
- /**
- * The type of the source database is unknown.
- *
- * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0;
- */
- const DATABASE_TYPE_UNSPECIFIED = 0;
- /**
- * The type of the source database is MySQL.
- *
- * Generated from protobuf enum MYSQL = 1;
- */
- const MYSQL = 1;
-
- private static $valueToName = [
- self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED',
- self::MYSQL => 'MYSQL',
- ];
-
- 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/DataprocMetastore/src/V1beta/MetadataImport/State.php b/DataprocMetastore/src/V1beta/MetadataImport/State.php
deleted file mode 100644
index 842fb19118f1..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataImport/State.php
+++ /dev/null
@@ -1,77 +0,0 @@
-google.cloud.metastore.v1beta.MetadataImport.State
- */
-class State
-{
- /**
- * The state of the metadata import is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metadata import is running.
- *
- * Generated from protobuf enum RUNNING = 1;
- */
- const RUNNING = 1;
- /**
- * The metadata import completed successfully.
- *
- * Generated from protobuf enum SUCCEEDED = 2;
- */
- const SUCCEEDED = 2;
- /**
- * The metadata import is being updated.
- *
- * Generated from protobuf enum UPDATING = 3;
- */
- const UPDATING = 3;
- /**
- * The metadata import failed, and attempted metadata changes were rolled
- * back.
- *
- * Generated from protobuf enum FAILED = 4;
- */
- const FAILED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::RUNNING => 'RUNNING',
- self::SUCCEEDED => 'SUCCEEDED',
- self::UPDATING => 'UPDATING',
- self::FAILED => 'FAILED',
- ];
-
- 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/DataprocMetastore/src/V1beta/MetadataIntegration.php b/DataprocMetastore/src/V1beta/MetadataIntegration.php
deleted file mode 100644
index c766d5879807..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataIntegration.php
+++ /dev/null
@@ -1,121 +0,0 @@
-google.cloud.metastore.v1beta.MetadataIntegration
- */
-class MetadataIntegration extends \Google\Protobuf\Internal\Message
-{
- /**
- * The integration config for the Data Catalog service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1;
- */
- protected $data_catalog_config = null;
- /**
- * The integration config for the Dataplex service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2;
- */
- protected $dataplex_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1beta\DataCatalogConfig $data_catalog_config
- * The integration config for the Data Catalog service.
- * @type \Google\Cloud\Metastore\V1beta\DataplexConfig $dataplex_config
- * The integration config for the Dataplex service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The integration config for the Data Catalog service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1;
- * @return \Google\Cloud\Metastore\V1beta\DataCatalogConfig|null
- */
- public function getDataCatalogConfig()
- {
- return $this->data_catalog_config;
- }
-
- public function hasDataCatalogConfig()
- {
- return isset($this->data_catalog_config);
- }
-
- public function clearDataCatalogConfig()
- {
- unset($this->data_catalog_config);
- }
-
- /**
- * The integration config for the Data Catalog service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DataCatalogConfig data_catalog_config = 1;
- * @param \Google\Cloud\Metastore\V1beta\DataCatalogConfig $var
- * @return $this
- */
- public function setDataCatalogConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\DataCatalogConfig::class);
- $this->data_catalog_config = $var;
-
- return $this;
- }
-
- /**
- * The integration config for the Dataplex service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2;
- * @return \Google\Cloud\Metastore\V1beta\DataplexConfig|null
- */
- public function getDataplexConfig()
- {
- return $this->dataplex_config;
- }
-
- public function hasDataplexConfig()
- {
- return isset($this->dataplex_config);
- }
-
- public function clearDataplexConfig()
- {
- unset($this->dataplex_config);
- }
-
- /**
- * The integration config for the Dataplex service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.DataplexConfig dataplex_config = 2;
- * @param \Google\Cloud\Metastore\V1beta\DataplexConfig $var
- * @return $this
- */
- public function setDataplexConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\DataplexConfig::class);
- $this->dataplex_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/MetadataManagementActivity.php b/DataprocMetastore/src/V1beta/MetadataManagementActivity.php
deleted file mode 100644
index 379ac929fda8..000000000000
--- a/DataprocMetastore/src/V1beta/MetadataManagementActivity.php
+++ /dev/null
@@ -1,101 +0,0 @@
-google.cloud.metastore.v1beta.MetadataManagementActivity
- */
-class MetadataManagementActivity extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The latest metadata exports of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $metadata_exports;
- /**
- * Output only. The latest restores of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- private $restores;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\MetadataExport>|\Google\Protobuf\Internal\RepeatedField $metadata_exports
- * Output only. The latest metadata exports of the metastore service.
- * @type array<\Google\Cloud\Metastore\V1beta\Restore>|\Google\Protobuf\Internal\RepeatedField $restores
- * Output only. The latest restores of the metastore service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The latest metadata exports of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getMetadataExports()
- {
- return $this->metadata_exports;
- }
-
- /**
- * Output only. The latest metadata exports of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.MetadataExport metadata_exports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param array<\Google\Cloud\Metastore\V1beta\MetadataExport>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setMetadataExports($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\MetadataExport::class);
- $this->metadata_exports = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The latest restores of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRestores()
- {
- return $this->restores;
- }
-
- /**
- * Output only. The latest restores of the metastore service.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.Restore restores = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param array<\Google\Cloud\Metastore\V1beta\Restore>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRestores($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\Restore::class);
- $this->restores = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/MoveTableToDatabaseRequest.php b/DataprocMetastore/src/V1beta/MoveTableToDatabaseRequest.php
deleted file mode 100644
index cb5c97e47bce..000000000000
--- a/DataprocMetastore/src/V1beta/MoveTableToDatabaseRequest.php
+++ /dev/null
@@ -1,178 +0,0 @@
-google.cloud.metastore.v1beta.MoveTableToDatabaseRequest
- */
-class MoveTableToDatabaseRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. The name of the table to be moved.
- *
- * Generated from protobuf field string table_name = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $table_name = '';
- /**
- * Required. The name of the database where the table resides.
- *
- * Generated from protobuf field string db_name = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $db_name = '';
- /**
- * Required. The name of the database where the table should be moved.
- *
- * Generated from protobuf field string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $destination_db_name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $table_name
- * Required. The name of the table to be moved.
- * @type string $db_name
- * Required. The name of the database where the table resides.
- * @type string $destination_db_name
- * Required. The name of the database where the table should be moved.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to mutate
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the table to be moved.
- *
- * Generated from protobuf field string table_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getTableName()
- {
- return $this->table_name;
- }
-
- /**
- * Required. The name of the table to be moved.
- *
- * Generated from protobuf field string table_name = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setTableName($var)
- {
- GPBUtil::checkString($var, True);
- $this->table_name = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the database where the table resides.
- *
- * Generated from protobuf field string db_name = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getDbName()
- {
- return $this->db_name;
- }
-
- /**
- * Required. The name of the database where the table resides.
- *
- * Generated from protobuf field string db_name = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setDbName($var)
- {
- GPBUtil::checkString($var, True);
- $this->db_name = $var;
-
- return $this;
- }
-
- /**
- * Required. The name of the database where the table should be moved.
- *
- * Generated from protobuf field string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getDestinationDbName()
- {
- return $this->destination_db_name;
- }
-
- /**
- * Required. The name of the database where the table should be moved.
- *
- * Generated from protobuf field string destination_db_name = 4 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setDestinationDbName($var)
- {
- GPBUtil::checkString($var, True);
- $this->destination_db_name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/MoveTableToDatabaseResponse.php b/DataprocMetastore/src/V1beta/MoveTableToDatabaseResponse.php
deleted file mode 100644
index d37cfad3e623..000000000000
--- a/DataprocMetastore/src/V1beta/MoveTableToDatabaseResponse.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.cloud.metastore.v1beta.MoveTableToDatabaseResponse
- */
-class MoveTableToDatabaseResponse extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/NetworkConfig.php b/DataprocMetastore/src/V1beta/NetworkConfig.php
deleted file mode 100644
index 234b8b9add3b..000000000000
--- a/DataprocMetastore/src/V1beta/NetworkConfig.php
+++ /dev/null
@@ -1,110 +0,0 @@
-google.cloud.metastore.v1beta.NetworkConfig
- */
-class NetworkConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- private $consumers;
- /**
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- *
- * Generated from protobuf field bool custom_routes_enabled = 2;
- */
- protected $custom_routes_enabled = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Metastore\V1beta\NetworkConfig\Consumer>|\Google\Protobuf\Internal\RepeatedField $consumers
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- * @type bool $custom_routes_enabled
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getConsumers()
- {
- return $this->consumers;
- }
-
- /**
- * Immutable. The consumer-side network configuration for the Dataproc
- * Metastore instance.
- *
- * Generated from protobuf field repeated .google.cloud.metastore.v1beta.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param array<\Google\Cloud\Metastore\V1beta\NetworkConfig\Consumer>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setConsumers($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1beta\NetworkConfig\Consumer::class);
- $this->consumers = $arr;
-
- return $this;
- }
-
- /**
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- *
- * Generated from protobuf field bool custom_routes_enabled = 2;
- * @return bool
- */
- public function getCustomRoutesEnabled()
- {
- return $this->custom_routes_enabled;
- }
-
- /**
- * Enables custom routes to be imported and exported for the Dataproc
- * Metastore service's peered VPC network.
- *
- * Generated from protobuf field bool custom_routes_enabled = 2;
- * @param bool $var
- * @return $this
- */
- public function setCustomRoutesEnabled($var)
- {
- GPBUtil::checkBool($var);
- $this->custom_routes_enabled = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/NetworkConfig/Consumer.php b/DataprocMetastore/src/V1beta/NetworkConfig/Consumer.php
deleted file mode 100644
index dcc51b7bdb15..000000000000
--- a/DataprocMetastore/src/V1beta/NetworkConfig/Consumer.php
+++ /dev/null
@@ -1,171 +0,0 @@
-google.cloud.metastore.v1beta.NetworkConfig.Consumer
- */
-class Consumer extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- *
- * Generated from protobuf field string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $endpoint_uri = '';
- /**
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string endpoint_location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $endpoint_location = '';
- protected $vpc_resource;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $subnetwork
- * Immutable. The subnetwork of the customer project from which an IP
- * address is reserved and used as the Dataproc Metastore service's
- * endpoint. It is accessible to hosts in the subnet and to all
- * hosts in a subnet in the same region and same network. There must
- * be at least one IP address available in the subnet's primary range. The
- * subnet is specified in the following form:
- * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
- * @type string $endpoint_uri
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- * @type string $endpoint_location
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Immutable. The subnetwork of the customer project from which an IP
- * address is reserved and used as the Dataproc Metastore service's
- * endpoint. It is accessible to hosts in the subnet and to all
- * hosts in a subnet in the same region and same network. There must
- * be at least one IP address available in the subnet's primary range. The
- * subnet is specified in the following form:
- * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @return string
- */
- public function getSubnetwork()
- {
- return $this->readOneof(1);
- }
-
- public function hasSubnetwork()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Immutable. The subnetwork of the customer project from which an IP
- * address is reserved and used as the Dataproc Metastore service's
- * endpoint. It is accessible to hosts in the subnet and to all
- * hosts in a subnet in the same region and same network. There must
- * be at least one IP address available in the subnet's primary range. The
- * subnet is specified in the following form:
- * `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}`
- *
- * Generated from protobuf field string subnetwork = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setSubnetwork($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- *
- * Generated from protobuf field string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEndpointUri()
- {
- return $this->endpoint_uri;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore
- * service.
- *
- * Generated from protobuf field string endpoint_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEndpointUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_uri = $var;
-
- return $this;
- }
-
- /**
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string endpoint_location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getEndpointLocation()
- {
- return $this->endpoint_location;
- }
-
- /**
- * Output only. The location of the endpoint URI. Format:
- * `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string endpoint_location = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setEndpointLocation($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_location = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getVpcResource()
- {
- return $this->whichOneof("vpc_resource");
- }
-
-}
-
-
diff --git a/DataprocMetastore/src/V1beta/OperationMetadata.php b/DataprocMetastore/src/V1beta/OperationMetadata.php
deleted file mode 100644
index e0a817144fa2..000000000000
--- a/DataprocMetastore/src/V1beta/OperationMetadata.php
+++ /dev/null
@@ -1,307 +0,0 @@
-google.cloud.metastore.v1beta.OperationMetadata
- */
-class OperationMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $target = '';
- /**
- * Output only. Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $verb = '';
- /**
- * Output only. Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $status_message = '';
- /**
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- *
- * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $requested_cancellation = false;
- /**
- * Output only. API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $api_version = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time the operation was created.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time the operation finished running.
- * @type string $target
- * Output only. Server-defined resource path for the target of the operation.
- * @type string $verb
- * Output only. Name of the verb executed by the operation.
- * @type string $status_message
- * Output only. Human-readable status of the operation, if any.
- * @type bool $requested_cancellation
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- * @type string $api_version
- * Output only. API version used to start the operation.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time the operation finished running.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getTarget()
- {
- return $this->target;
- }
-
- /**
- * Output only. Server-defined resource path for the target of the operation.
- *
- * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setTarget($var)
- {
- GPBUtil::checkString($var, True);
- $this->target = $var;
-
- return $this;
- }
-
- /**
- * Output only. Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getVerb()
- {
- return $this->verb;
- }
-
- /**
- * Output only. Name of the verb executed by the operation.
- *
- * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setVerb($var)
- {
- GPBUtil::checkString($var, True);
- $this->verb = $var;
-
- return $this;
- }
-
- /**
- * Output only. Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getStatusMessage()
- {
- return $this->status_message;
- }
-
- /**
- * Output only. Human-readable status of the operation, if any.
- *
- * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setStatusMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->status_message = $var;
-
- return $this;
- }
-
- /**
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- *
- * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return bool
- */
- public function getRequestedCancellation()
- {
- return $this->requested_cancellation;
- }
-
- /**
- * Output only. Identifies whether the caller has requested cancellation
- * of the operation. Operations that have successfully been cancelled
- * have [Operation.error][] value with a
- * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
- * `Code.CANCELLED`.
- *
- * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param bool $var
- * @return $this
- */
- public function setRequestedCancellation($var)
- {
- GPBUtil::checkBool($var);
- $this->requested_cancellation = $var;
-
- return $this;
- }
-
- /**
- * Output only. API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getApiVersion()
- {
- return $this->api_version;
- }
-
- /**
- * Output only. API version used to start the operation.
- *
- * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setApiVersion($var)
- {
- GPBUtil::checkString($var, True);
- $this->api_version = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/QueryMetadataRequest.php b/DataprocMetastore/src/V1beta/QueryMetadataRequest.php
deleted file mode 100644
index fcab55a190ee..000000000000
--- a/DataprocMetastore/src/V1beta/QueryMetadataRequest.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.metastore.v1beta.QueryMetadataRequest
- */
-class QueryMetadataRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- *
- * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $query = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $query
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to query
- * metadata, in the following format:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- *
- * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getQuery()
- {
- return $this->query;
- }
-
- /**
- * Required. A read-only SQL query to execute against the metadata database.
- * The query cannot change or mutate the data.
- *
- * Generated from protobuf field string query = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setQuery($var)
- {
- GPBUtil::checkString($var, True);
- $this->query = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/QueryMetadataResponse.php b/DataprocMetastore/src/V1beta/QueryMetadataResponse.php
deleted file mode 100644
index c9ce754485c8..000000000000
--- a/DataprocMetastore/src/V1beta/QueryMetadataResponse.php
+++ /dev/null
@@ -1,80 +0,0 @@
-google.cloud.metastore.v1beta.QueryMetadataResponse
- */
-class QueryMetadataResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- *
- * Generated from protobuf field string result_manifest_uri = 1;
- */
- protected $result_manifest_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $result_manifest_uri
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- *
- * Generated from protobuf field string result_manifest_uri = 1;
- * @return string
- */
- public function getResultManifestUri()
- {
- return $this->result_manifest_uri;
- }
-
- /**
- * The manifest URI is link to a JSON instance in Cloud Storage.
- * This instance manifests immediately along with QueryMetadataResponse. The
- * content of the URI is not retriable until the long-running operation query
- * against the metadata finishes.
- *
- * Generated from protobuf field string result_manifest_uri = 1;
- * @param string $var
- * @return $this
- */
- public function setResultManifestUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->result_manifest_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/RemoveIamPolicyRequest.php b/DataprocMetastore/src/V1beta/RemoveIamPolicyRequest.php
deleted file mode 100644
index ef9bdbaada41..000000000000
--- a/DataprocMetastore/src/V1beta/RemoveIamPolicyRequest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-google.cloud.metastore.v1beta.RemoveIamPolicyRequest
- */
-class RemoveIamPolicyRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- *
- * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $resource = '';
- /**
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- *
- * Generated from protobuf field bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $asynchronous = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $resource
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- * @type bool $asynchronous
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- *
- * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * Required. The relative resource name of the dataplane resource to remove
- * IAM policy, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}`
- * or
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}`.
- *
- * Generated from protobuf field string resource = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setResource($var)
- {
- GPBUtil::checkString($var, True);
- $this->resource = $var;
-
- return $this;
- }
-
- /**
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- *
- * Generated from protobuf field bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return bool
- */
- public function getAsynchronous()
- {
- return $this->asynchronous;
- }
-
- /**
- * Optional. Removes IAM policy attached to database or table asynchronously
- * when it is set. The default is false.
- *
- * Generated from protobuf field bool asynchronous = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param bool $var
- * @return $this
- */
- public function setAsynchronous($var)
- {
- GPBUtil::checkBool($var);
- $this->asynchronous = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/RemoveIamPolicyResponse.php b/DataprocMetastore/src/V1beta/RemoveIamPolicyResponse.php
deleted file mode 100644
index 97cd799fd970..000000000000
--- a/DataprocMetastore/src/V1beta/RemoveIamPolicyResponse.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.metastore.v1beta.RemoveIamPolicyResponse
- */
-class RemoveIamPolicyResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * True if the policy is successfully removed.
- *
- * Generated from protobuf field bool success = 1;
- */
- protected $success = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $success
- * True if the policy is successfully removed.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * True if the policy is successfully removed.
- *
- * Generated from protobuf field bool success = 1;
- * @return bool
- */
- public function getSuccess()
- {
- return $this->success;
- }
-
- /**
- * True if the policy is successfully removed.
- *
- * Generated from protobuf field bool success = 1;
- * @param bool $var
- * @return $this
- */
- public function setSuccess($var)
- {
- GPBUtil::checkBool($var);
- $this->success = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Restore.php b/DataprocMetastore/src/V1beta/Restore.php
deleted file mode 100644
index 08b45e5feddb..000000000000
--- a/DataprocMetastore/src/V1beta/Restore.php
+++ /dev/null
@@ -1,269 +0,0 @@
-google.cloud.metastore.v1beta.Restore
- */
-class Restore extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. The time when the restore started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $start_time = null;
- /**
- * Output only. The time when the restore ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $end_time = null;
- /**
- * Output only. The current state of the restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $backup = '';
- /**
- * Output only. The type of restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $type = 0;
- /**
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- *
- * Generated from protobuf field string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $details = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Timestamp $start_time
- * Output only. The time when the restore started.
- * @type \Google\Protobuf\Timestamp $end_time
- * Output only. The time when the restore ended.
- * @type int $state
- * Output only. The current state of the restore.
- * @type string $backup
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @type int $type
- * Output only. The type of restore.
- * @type string $details
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. The time when the restore started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Output only. The time when the restore started.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the restore ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Output only. The time when the restore ended.
- *
- * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Restore\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getBackup()
- {
- return $this->backup;
- }
-
- /**
- * Output only. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setBackup($var)
- {
- GPBUtil::checkString($var, True);
- $this->backup = $var;
-
- return $this;
- }
-
- /**
- * Output only. The type of restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Output only. The type of restore.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.RestoreType type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Restore\RestoreType::class);
- $this->type = $var;
-
- return $this;
- }
-
- /**
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- *
- * Generated from protobuf field string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getDetails()
- {
- return $this->details;
- }
-
- /**
- * Output only. The restore details containing the revision of the service to
- * be restored to, in format of JSON.
- *
- * Generated from protobuf field string details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setDetails($var)
- {
- GPBUtil::checkString($var, True);
- $this->details = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Restore/RestoreType.php b/DataprocMetastore/src/V1beta/Restore/RestoreType.php
deleted file mode 100644
index 6fdad42a1d1b..000000000000
--- a/DataprocMetastore/src/V1beta/Restore/RestoreType.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1beta.Restore.RestoreType
- */
-class RestoreType
-{
- /**
- * The restore type is unknown.
- *
- * Generated from protobuf enum RESTORE_TYPE_UNSPECIFIED = 0;
- */
- const RESTORE_TYPE_UNSPECIFIED = 0;
- /**
- * The service's metadata and configuration are restored.
- *
- * Generated from protobuf enum FULL = 1;
- */
- const FULL = 1;
- /**
- * Only the service's metadata is restored.
- *
- * Generated from protobuf enum METADATA_ONLY = 2;
- */
- const METADATA_ONLY = 2;
-
- private static $valueToName = [
- self::RESTORE_TYPE_UNSPECIFIED => 'RESTORE_TYPE_UNSPECIFIED',
- self::FULL => 'FULL',
- self::METADATA_ONLY => 'METADATA_ONLY',
- ];
-
- 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/DataprocMetastore/src/V1beta/Restore/State.php b/DataprocMetastore/src/V1beta/Restore/State.php
deleted file mode 100644
index efc9ff1807b8..000000000000
--- a/DataprocMetastore/src/V1beta/Restore/State.php
+++ /dev/null
@@ -1,76 +0,0 @@
-google.cloud.metastore.v1beta.Restore.State
- */
-class State
-{
- /**
- * The state of the metadata restore is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metadata restore is running.
- *
- * Generated from protobuf enum RUNNING = 1;
- */
- const RUNNING = 1;
- /**
- * The metadata restore completed successfully.
- *
- * Generated from protobuf enum SUCCEEDED = 2;
- */
- const SUCCEEDED = 2;
- /**
- * The metadata restore failed.
- *
- * Generated from protobuf enum FAILED = 3;
- */
- const FAILED = 3;
- /**
- * The metadata restore is cancelled.
- *
- * Generated from protobuf enum CANCELLED = 4;
- */
- const CANCELLED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::RUNNING => 'RUNNING',
- self::SUCCEEDED => 'SUCCEEDED',
- self::FAILED => 'FAILED',
- self::CANCELLED => 'CANCELLED',
- ];
-
- 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/DataprocMetastore/src/V1beta/RestoreServiceRequest.php b/DataprocMetastore/src/V1beta/RestoreServiceRequest.php
deleted file mode 100644
index 9b2a11f70b4d..000000000000
--- a/DataprocMetastore/src/V1beta/RestoreServiceRequest.php
+++ /dev/null
@@ -1,221 +0,0 @@
-google.cloud.metastore.v1beta.RestoreServiceRequest
- */
-class RestoreServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $service = '';
- /**
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $backup = '';
- /**
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $restore_type = 0;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $service
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @type string $backup
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @type int $restore_type
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getService()
- {
- return $this->service;
- }
-
- /**
- * Required. The relative resource name of the metastore service to run
- * restore, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string service = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkString($var, True);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getBackup()
- {
- return $this->backup;
- }
-
- /**
- * Required. The relative resource name of the metastore service backup to
- * restore from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- *
- * Generated from protobuf field string backup = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setBackup($var)
- {
- GPBUtil::checkString($var, True);
- $this->backup = $var;
-
- return $this;
- }
-
- /**
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getRestoreType()
- {
- return $this->restore_type;
- }
-
- /**
- * Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Restore.RestoreType restore_type = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setRestoreType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Restore\RestoreType::class);
- $this->restore_type = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ScalingConfig.php b/DataprocMetastore/src/V1beta/ScalingConfig.php
deleted file mode 100644
index e186117be2c7..000000000000
--- a/DataprocMetastore/src/V1beta/ScalingConfig.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.metastore.v1beta.ScalingConfig
- */
-class ScalingConfig extends \Google\Protobuf\Internal\Message
-{
- protected $scaling_model;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $instance_size
- * An enum of readable instance sizes, with each instance size mapping to a
- * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
- * @type float $scaling_factor
- * Scaling factor, increments of 0.1 for values less than 1.0, and
- * increments of 1.0 for values greater than 1.0.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * An enum of readable instance sizes, with each instance size mapping to a
- * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1;
- * @return int
- */
- public function getInstanceSize()
- {
- return $this->readOneof(1);
- }
-
- public function hasInstanceSize()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * An enum of readable instance sizes, with each instance size mapping to a
- * float value (e.g. InstanceSize.EXTRA_SMALL = scaling_factor(0.1))
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.ScalingConfig.InstanceSize instance_size = 1;
- * @param int $var
- * @return $this
- */
- public function setInstanceSize($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\ScalingConfig\InstanceSize::class);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * Scaling factor, increments of 0.1 for values less than 1.0, and
- * increments of 1.0 for values greater than 1.0.
- *
- * Generated from protobuf field float scaling_factor = 2;
- * @return float
- */
- public function getScalingFactor()
- {
- return $this->readOneof(2);
- }
-
- public function hasScalingFactor()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * Scaling factor, increments of 0.1 for values less than 1.0, and
- * increments of 1.0 for values greater than 1.0.
- *
- * Generated from protobuf field float scaling_factor = 2;
- * @param float $var
- * @return $this
- */
- public function setScalingFactor($var)
- {
- GPBUtil::checkFloat($var);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getScalingModel()
- {
- return $this->whichOneof("scaling_model");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/ScalingConfig/InstanceSize.php b/DataprocMetastore/src/V1beta/ScalingConfig/InstanceSize.php
deleted file mode 100644
index f22d3c7ab425..000000000000
--- a/DataprocMetastore/src/V1beta/ScalingConfig/InstanceSize.php
+++ /dev/null
@@ -1,83 +0,0 @@
-google.cloud.metastore.v1beta.ScalingConfig.InstanceSize
- */
-class InstanceSize
-{
- /**
- * Unspecified instance size
- *
- * Generated from protobuf enum INSTANCE_SIZE_UNSPECIFIED = 0;
- */
- const INSTANCE_SIZE_UNSPECIFIED = 0;
- /**
- * Extra small instance size, maps to a scaling factor of 0.1.
- *
- * Generated from protobuf enum EXTRA_SMALL = 1;
- */
- const EXTRA_SMALL = 1;
- /**
- * Small instance size, maps to a scaling factor of 0.5.
- *
- * Generated from protobuf enum SMALL = 2;
- */
- const SMALL = 2;
- /**
- * Medium instance size, maps to a scaling factor of 1.0.
- *
- * Generated from protobuf enum MEDIUM = 3;
- */
- const MEDIUM = 3;
- /**
- * Large instance size, maps to a scaling factor of 3.0.
- *
- * Generated from protobuf enum LARGE = 4;
- */
- const LARGE = 4;
- /**
- * Extra large instance size, maps to a scaling factor of 6.0.
- *
- * Generated from protobuf enum EXTRA_LARGE = 5;
- */
- const EXTRA_LARGE = 5;
-
- private static $valueToName = [
- self::INSTANCE_SIZE_UNSPECIFIED => 'INSTANCE_SIZE_UNSPECIFIED',
- self::EXTRA_SMALL => 'EXTRA_SMALL',
- self::SMALL => 'SMALL',
- self::MEDIUM => 'MEDIUM',
- self::LARGE => 'LARGE',
- self::EXTRA_LARGE => 'EXTRA_LARGE',
- ];
-
- 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/DataprocMetastore/src/V1beta/Secret.php b/DataprocMetastore/src/V1beta/Secret.php
deleted file mode 100644
index 6ce2915dba4f..000000000000
--- a/DataprocMetastore/src/V1beta/Secret.php
+++ /dev/null
@@ -1,81 +0,0 @@
-google.cloud.metastore.v1beta.Secret
- */
-class Secret extends \Google\Protobuf\Internal\Message
-{
- protected $value;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $cloud_secret
- * The relative resource name of a Secret Manager secret version, in the
- * following form:
- * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The relative resource name of a Secret Manager secret version, in the
- * following form:
- * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
- *
- * Generated from protobuf field string cloud_secret = 2;
- * @return string
- */
- public function getCloudSecret()
- {
- return $this->readOneof(2);
- }
-
- public function hasCloudSecret()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * The relative resource name of a Secret Manager secret version, in the
- * following form:
- * `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
- *
- * Generated from protobuf field string cloud_secret = 2;
- * @param string $var
- * @return $this
- */
- public function setCloudSecret($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getValue()
- {
- return $this->whichOneof("value");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Service.php b/DataprocMetastore/src/V1beta/Service.php
deleted file mode 100644
index 5c9d221a90af..000000000000
--- a/DataprocMetastore/src/V1beta/Service.php
+++ /dev/null
@@ -1,942 +0,0 @@
-google.cloud.metastore.v1beta.Service
- */
-class Service extends \Google\Protobuf\Internal\Message
-{
- /**
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $name = '';
- /**
- * Output only. The time when the metastore service was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The time when the metastore service was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * User-defined labels for the metastore service.
- *
- * Generated from protobuf field map labels = 4;
- */
- private $labels;
- /**
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- *
- * Generated from protobuf field string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- */
- protected $network = '';
- /**
- * Output only. The URI of the endpoint used to access the metastore service.
- *
- * Generated from protobuf field string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $endpoint_uri = '';
- /**
- * The TCP port at which the metastore service is reached. Default: 9083.
- *
- * Generated from protobuf field int32 port = 9;
- */
- protected $port = 0;
- /**
- * Output only. The current state of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- *
- * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state_message = '';
- /**
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- *
- * Generated from protobuf field string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $artifact_gcs_uri = '';
- /**
- * The tier of the service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.Tier tier = 13;
- */
- protected $tier = 0;
- /**
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14;
- */
- protected $metadata_integration = null;
- /**
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15;
- */
- protected $maintenance_window = null;
- /**
- * Output only. The globally unique resource identifier of the metastore
- * service.
- *
- * Generated from protobuf field string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
- /**
- * Output only. The metadata management activities of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $metadata_management_activity = null;
- /**
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $release_channel = 0;
- /**
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $encryption_config = null;
- /**
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.NetworkConfig network_config = 21;
- */
- protected $network_config = null;
- /**
- * Immutable. The database type that the Metastore service stores its data.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE];
- */
- protected $database_type = 0;
- /**
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23;
- */
- protected $telemetry_config = null;
- /**
- * Scaling configuration of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24;
- */
- protected $scaling_config = null;
- protected $metastore_config;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Metastore\V1beta\HiveMetastoreConfig $hive_metastore_config
- * Configuration information specific to running Hive metastore
- * software as the metastore service.
- * @type string $name
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. The time when the metastore service was created.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The time when the metastore service was last updated.
- * @type array|\Google\Protobuf\Internal\MapField $labels
- * User-defined labels for the metastore service.
- * @type string $network
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- * @type string $endpoint_uri
- * Output only. The URI of the endpoint used to access the metastore service.
- * @type int $port
- * The TCP port at which the metastore service is reached. Default: 9083.
- * @type int $state
- * Output only. The current state of the metastore service.
- * @type string $state_message
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- * @type string $artifact_gcs_uri
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- * @type int $tier
- * The tier of the service.
- * @type \Google\Cloud\Metastore\V1beta\MetadataIntegration $metadata_integration
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- * @type \Google\Cloud\Metastore\V1beta\MaintenanceWindow $maintenance_window
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- * @type string $uid
- * Output only. The globally unique resource identifier of the metastore
- * service.
- * @type \Google\Cloud\Metastore\V1beta\MetadataManagementActivity $metadata_management_activity
- * Output only. The metadata management activities of the metastore service.
- * @type int $release_channel
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- * @type \Google\Cloud\Metastore\V1beta\EncryptionConfig $encryption_config
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- * @type \Google\Cloud\Metastore\V1beta\NetworkConfig $network_config
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- * @type int $database_type
- * Immutable. The database type that the Metastore service stores its data.
- * @type \Google\Cloud\Metastore\V1beta\TelemetryConfig $telemetry_config
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- * @type \Google\Cloud\Metastore\V1beta\ScalingConfig $scaling_config
- * Scaling configuration of the metastore service.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Configuration information specific to running Hive metastore
- * software as the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5;
- * @return \Google\Cloud\Metastore\V1beta\HiveMetastoreConfig|null
- */
- public function getHiveMetastoreConfig()
- {
- return $this->readOneof(5);
- }
-
- public function hasHiveMetastoreConfig()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * Configuration information specific to running Hive metastore
- * software as the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.HiveMetastoreConfig hive_metastore_config = 5;
- * @param \Google\Cloud\Metastore\V1beta\HiveMetastoreConfig $var
- * @return $this
- */
- public function setHiveMetastoreConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\HiveMetastoreConfig::class);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Immutable. The relative resource name of the metastore service, in the
- * following format:
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore service was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. The time when the metastore service was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time when the metastore service was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The time when the metastore service was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * User-defined labels for the metastore service.
- *
- * Generated from protobuf field map labels = 4;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getLabels()
- {
- return $this->labels;
- }
-
- /**
- * User-defined labels for the metastore service.
- *
- * Generated from protobuf field map labels = 4;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setLabels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->labels = $arr;
-
- return $this;
- }
-
- /**
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- *
- * Generated from protobuf field string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @return string
- */
- public function getNetwork()
- {
- return $this->network;
- }
-
- /**
- * Immutable. The relative resource name of the VPC network on which the
- * instance can be accessed. It is specified in the following form:
- * `projects/{project_number}/global/networks/{network_id}`.
- *
- * Generated from protobuf field string network = 7 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setNetwork($var)
- {
- GPBUtil::checkString($var, True);
- $this->network = $var;
-
- return $this;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore service.
- *
- * Generated from protobuf field string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEndpointUri()
- {
- return $this->endpoint_uri;
- }
-
- /**
- * Output only. The URI of the endpoint used to access the metastore service.
- *
- * Generated from protobuf field string endpoint_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEndpointUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->endpoint_uri = $var;
-
- return $this;
- }
-
- /**
- * The TCP port at which the metastore service is reached. Default: 9083.
- *
- * Generated from protobuf field int32 port = 9;
- * @return int
- */
- public function getPort()
- {
- return $this->port;
- }
-
- /**
- * The TCP port at which the metastore service is reached. Default: 9083.
- *
- * Generated from protobuf field int32 port = 9;
- * @param int $var
- * @return $this
- */
- public function setPort($var)
- {
- GPBUtil::checkInt32($var);
- $this->port = $var;
-
- return $this;
- }
-
- /**
- * Output only. The current state of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The current state of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Service\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- *
- * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getStateMessage()
- {
- return $this->state_message;
- }
-
- /**
- * Output only. Additional information about the current state of the
- * metastore service, if available.
- *
- * Generated from protobuf field string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setStateMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->state_message = $var;
-
- return $this;
- }
-
- /**
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- *
- * Generated from protobuf field string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getArtifactGcsUri()
- {
- return $this->artifact_gcs_uri;
- }
-
- /**
- * Output only. A Cloud Storage URI (starting with `gs://`) that specifies
- * where artifacts related to the metastore service are stored.
- *
- * Generated from protobuf field string artifact_gcs_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setArtifactGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->artifact_gcs_uri = $var;
-
- return $this;
- }
-
- /**
- * The tier of the service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.Tier tier = 13;
- * @return int
- */
- public function getTier()
- {
- return $this->tier;
- }
-
- /**
- * The tier of the service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.Tier tier = 13;
- * @param int $var
- * @return $this
- */
- public function setTier($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Service\Tier::class);
- $this->tier = $var;
-
- return $this;
- }
-
- /**
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14;
- * @return \Google\Cloud\Metastore\V1beta\MetadataIntegration|null
- */
- public function getMetadataIntegration()
- {
- return $this->metadata_integration;
- }
-
- public function hasMetadataIntegration()
- {
- return isset($this->metadata_integration);
- }
-
- public function clearMetadataIntegration()
- {
- unset($this->metadata_integration);
- }
-
- /**
- * The setting that defines how metastore metadata should be integrated with
- * external services and systems.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataIntegration metadata_integration = 14;
- * @param \Google\Cloud\Metastore\V1beta\MetadataIntegration $var
- * @return $this
- */
- public function setMetadataIntegration($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\MetadataIntegration::class);
- $this->metadata_integration = $var;
-
- return $this;
- }
-
- /**
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15;
- * @return \Google\Cloud\Metastore\V1beta\MaintenanceWindow|null
- */
- public function getMaintenanceWindow()
- {
- return $this->maintenance_window;
- }
-
- public function hasMaintenanceWindow()
- {
- return isset($this->maintenance_window);
- }
-
- public function clearMaintenanceWindow()
- {
- unset($this->maintenance_window);
- }
-
- /**
- * The one hour maintenance window of the metastore service. This specifies
- * when the service can be restarted for maintenance purposes in UTC time.
- * Maintenance window is not needed for services with the SPANNER
- * database type.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MaintenanceWindow maintenance_window = 15;
- * @param \Google\Cloud\Metastore\V1beta\MaintenanceWindow $var
- * @return $this
- */
- public function setMaintenanceWindow($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\MaintenanceWindow::class);
- $this->maintenance_window = $var;
-
- return $this;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * service.
- *
- * Generated from protobuf field string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. The globally unique resource identifier of the metastore
- * service.
- *
- * Generated from protobuf field string uid = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
- /**
- * Output only. The metadata management activities of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Metastore\V1beta\MetadataManagementActivity|null
- */
- public function getMetadataManagementActivity()
- {
- return $this->metadata_management_activity;
- }
-
- public function hasMetadataManagementActivity()
- {
- return isset($this->metadata_management_activity);
- }
-
- public function clearMetadataManagementActivity()
- {
- unset($this->metadata_management_activity);
- }
-
- /**
- * Output only. The metadata management activities of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataManagementActivity metadata_management_activity = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Metastore\V1beta\MetadataManagementActivity $var
- * @return $this
- */
- public function setMetadataManagementActivity($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\MetadataManagementActivity::class);
- $this->metadata_management_activity = $var;
-
- return $this;
- }
-
- /**
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE];
- * @return int
- */
- public function getReleaseChannel()
- {
- return $this->release_channel;
- }
-
- /**
- * Immutable. The release channel of the service.
- * If unspecified, defaults to `STABLE`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.ReleaseChannel release_channel = 19 [(.google.api.field_behavior) = IMMUTABLE];
- * @param int $var
- * @return $this
- */
- public function setReleaseChannel($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Service\ReleaseChannel::class);
- $this->release_channel = $var;
-
- return $this;
- }
-
- /**
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE];
- * @return \Google\Cloud\Metastore\V1beta\EncryptionConfig|null
- */
- public function getEncryptionConfig()
- {
- return $this->encryption_config;
- }
-
- public function hasEncryptionConfig()
- {
- return isset($this->encryption_config);
- }
-
- public function clearEncryptionConfig()
- {
- unset($this->encryption_config);
- }
-
- /**
- * Immutable. Information used to configure the Dataproc Metastore service to
- * encrypt customer data at rest. Cannot be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.EncryptionConfig encryption_config = 20 [(.google.api.field_behavior) = IMMUTABLE];
- * @param \Google\Cloud\Metastore\V1beta\EncryptionConfig $var
- * @return $this
- */
- public function setEncryptionConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\EncryptionConfig::class);
- $this->encryption_config = $var;
-
- return $this;
- }
-
- /**
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.NetworkConfig network_config = 21;
- * @return \Google\Cloud\Metastore\V1beta\NetworkConfig|null
- */
- public function getNetworkConfig()
- {
- return $this->network_config;
- }
-
- public function hasNetworkConfig()
- {
- return isset($this->network_config);
- }
-
- public function clearNetworkConfig()
- {
- unset($this->network_config);
- }
-
- /**
- * The configuration specifying the network settings for the
- * Dataproc Metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.NetworkConfig network_config = 21;
- * @param \Google\Cloud\Metastore\V1beta\NetworkConfig $var
- * @return $this
- */
- public function setNetworkConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\NetworkConfig::class);
- $this->network_config = $var;
-
- return $this;
- }
-
- /**
- * Immutable. The database type that the Metastore service stores its data.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE];
- * @return int
- */
- public function getDatabaseType()
- {
- return $this->database_type;
- }
-
- /**
- * Immutable. The database type that the Metastore service stores its data.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service.DatabaseType database_type = 22 [(.google.api.field_behavior) = IMMUTABLE];
- * @param int $var
- * @return $this
- */
- public function setDatabaseType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\Service\DatabaseType::class);
- $this->database_type = $var;
-
- return $this;
- }
-
- /**
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23;
- * @return \Google\Cloud\Metastore\V1beta\TelemetryConfig|null
- */
- public function getTelemetryConfig()
- {
- return $this->telemetry_config;
- }
-
- public function hasTelemetryConfig()
- {
- return isset($this->telemetry_config);
- }
-
- public function clearTelemetryConfig()
- {
- unset($this->telemetry_config);
- }
-
- /**
- * The configuration specifying telemetry settings for the Dataproc Metastore
- * service. If unspecified defaults to `JSON`.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.TelemetryConfig telemetry_config = 23;
- * @param \Google\Cloud\Metastore\V1beta\TelemetryConfig $var
- * @return $this
- */
- public function setTelemetryConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\TelemetryConfig::class);
- $this->telemetry_config = $var;
-
- return $this;
- }
-
- /**
- * Scaling configuration of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24;
- * @return \Google\Cloud\Metastore\V1beta\ScalingConfig|null
- */
- public function getScalingConfig()
- {
- return $this->scaling_config;
- }
-
- public function hasScalingConfig()
- {
- return isset($this->scaling_config);
- }
-
- public function clearScalingConfig()
- {
- unset($this->scaling_config);
- }
-
- /**
- * Scaling configuration of the metastore service.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.ScalingConfig scaling_config = 24;
- * @param \Google\Cloud\Metastore\V1beta\ScalingConfig $var
- * @return $this
- */
- public function setScalingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\ScalingConfig::class);
- $this->scaling_config = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getMetastoreConfig()
- {
- return $this->whichOneof("metastore_config");
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/Service/DatabaseType.php b/DataprocMetastore/src/V1beta/Service/DatabaseType.php
deleted file mode 100644
index bccbafcda0c1..000000000000
--- a/DataprocMetastore/src/V1beta/Service/DatabaseType.php
+++ /dev/null
@@ -1,62 +0,0 @@
-google.cloud.metastore.v1beta.Service.DatabaseType
- */
-class DatabaseType
-{
- /**
- * The DATABASE_TYPE is not set.
- *
- * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0;
- */
- const DATABASE_TYPE_UNSPECIFIED = 0;
- /**
- * MySQL is used to persist the metastore data.
- *
- * Generated from protobuf enum MYSQL = 1;
- */
- const MYSQL = 1;
- /**
- * Spanner is used to persist the metastore data.
- *
- * Generated from protobuf enum SPANNER = 2;
- */
- const SPANNER = 2;
-
- private static $valueToName = [
- self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED',
- self::MYSQL => 'MYSQL',
- self::SPANNER => 'SPANNER',
- ];
-
- 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/DataprocMetastore/src/V1beta/Service/ReleaseChannel.php b/DataprocMetastore/src/V1beta/Service/ReleaseChannel.php
deleted file mode 100644
index d2997f8dfa9c..000000000000
--- a/DataprocMetastore/src/V1beta/Service/ReleaseChannel.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.cloud.metastore.v1beta.Service.ReleaseChannel
- */
-class ReleaseChannel
-{
- /**
- * Release channel is not specified.
- *
- * Generated from protobuf enum RELEASE_CHANNEL_UNSPECIFIED = 0;
- */
- const RELEASE_CHANNEL_UNSPECIFIED = 0;
- /**
- * The `CANARY` release channel contains the newest features, which may be
- * unstable and subject to unresolved issues with no known workarounds.
- * Services using the `CANARY` release channel are not subject to any SLAs.
- *
- * Generated from protobuf enum CANARY = 1;
- */
- const CANARY = 1;
- /**
- * The `STABLE` release channel contains features that are considered stable
- * and have been validated for production use.
- *
- * Generated from protobuf enum STABLE = 2;
- */
- const STABLE = 2;
-
- private static $valueToName = [
- self::RELEASE_CHANNEL_UNSPECIFIED => 'RELEASE_CHANNEL_UNSPECIFIED',
- self::CANARY => 'CANARY',
- self::STABLE => 'STABLE',
- ];
-
- 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/DataprocMetastore/src/V1beta/Service/State.php b/DataprocMetastore/src/V1beta/Service/State.php
deleted file mode 100644
index ca21008a828b..000000000000
--- a/DataprocMetastore/src/V1beta/Service/State.php
+++ /dev/null
@@ -1,100 +0,0 @@
-google.cloud.metastore.v1beta.Service.State
- */
-class State
-{
- /**
- * The state of the metastore service is unknown.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The metastore service is in the process of being created.
- *
- * Generated from protobuf enum CREATING = 1;
- */
- const CREATING = 1;
- /**
- * The metastore service is running and ready to serve queries.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * The metastore service is entering suspension. Its query-serving
- * availability may cease unexpectedly.
- *
- * Generated from protobuf enum SUSPENDING = 3;
- */
- const SUSPENDING = 3;
- /**
- * The metastore service is suspended and unable to serve queries.
- *
- * Generated from protobuf enum SUSPENDED = 4;
- */
- const SUSPENDED = 4;
- /**
- * The metastore service is being updated. It remains usable but cannot
- * accept additional update requests or be deleted at this time.
- *
- * Generated from protobuf enum UPDATING = 5;
- */
- const UPDATING = 5;
- /**
- * The metastore service is undergoing deletion. It cannot be used.
- *
- * Generated from protobuf enum DELETING = 6;
- */
- const DELETING = 6;
- /**
- * The metastore service has encountered an error and cannot be used. The
- * metastore service should be deleted.
- *
- * Generated from protobuf enum ERROR = 7;
- */
- const ERROR = 7;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::ACTIVE => 'ACTIVE',
- self::SUSPENDING => 'SUSPENDING',
- self::SUSPENDED => 'SUSPENDED',
- self::UPDATING => 'UPDATING',
- self::DELETING => 'DELETING',
- self::ERROR => 'ERROR',
- ];
-
- 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/DataprocMetastore/src/V1beta/Service/Tier.php b/DataprocMetastore/src/V1beta/Service/Tier.php
deleted file mode 100644
index ba111a37b061..000000000000
--- a/DataprocMetastore/src/V1beta/Service/Tier.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.cloud.metastore.v1beta.Service.Tier
- */
-class Tier
-{
- /**
- * The tier is not set.
- *
- * Generated from protobuf enum TIER_UNSPECIFIED = 0;
- */
- const TIER_UNSPECIFIED = 0;
- /**
- * The developer tier provides limited scalability and no fault tolerance.
- * Good for low-cost proof-of-concept.
- *
- * Generated from protobuf enum DEVELOPER = 1;
- */
- const DEVELOPER = 1;
- /**
- * The enterprise tier provides multi-zone high availability, and sufficient
- * scalability for enterprise-level Dataproc Metastore workloads.
- *
- * Generated from protobuf enum ENTERPRISE = 3;
- */
- const ENTERPRISE = 3;
-
- private static $valueToName = [
- self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED',
- self::DEVELOPER => 'DEVELOPER',
- self::ENTERPRISE => 'ENTERPRISE',
- ];
-
- 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/DataprocMetastore/src/V1beta/TelemetryConfig.php b/DataprocMetastore/src/V1beta/TelemetryConfig.php
deleted file mode 100644
index 01e916b9bdc0..000000000000
--- a/DataprocMetastore/src/V1beta/TelemetryConfig.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.cloud.metastore.v1beta.TelemetryConfig
- */
-class TelemetryConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The output format of the Dataproc Metastore service's logs.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1;
- */
- protected $log_format = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $log_format
- * The output format of the Dataproc Metastore service's logs.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The output format of the Dataproc Metastore service's logs.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1;
- * @return int
- */
- public function getLogFormat()
- {
- return $this->log_format;
- }
-
- /**
- * The output format of the Dataproc Metastore service's logs.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.TelemetryConfig.LogFormat log_format = 1;
- * @param int $var
- * @return $this
- */
- public function setLogFormat($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1beta\TelemetryConfig\LogFormat::class);
- $this->log_format = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/TelemetryConfig/LogFormat.php b/DataprocMetastore/src/V1beta/TelemetryConfig/LogFormat.php
deleted file mode 100644
index ac7f31769ed2..000000000000
--- a/DataprocMetastore/src/V1beta/TelemetryConfig/LogFormat.php
+++ /dev/null
@@ -1,60 +0,0 @@
-google.cloud.metastore.v1beta.TelemetryConfig.LogFormat
- */
-class LogFormat
-{
- /**
- * The LOG_FORMAT is not set.
- *
- * Generated from protobuf enum LOG_FORMAT_UNSPECIFIED = 0;
- */
- const LOG_FORMAT_UNSPECIFIED = 0;
- /**
- * Logging output uses the legacy `textPayload` format.
- *
- * Generated from protobuf enum LEGACY = 1;
- */
- const LEGACY = 1;
- /**
- * Logging output uses the `jsonPayload` format.
- *
- * Generated from protobuf enum JSON = 2;
- */
- const JSON = 2;
-
- private static $valueToName = [
- self::LOG_FORMAT_UNSPECIFIED => 'LOG_FORMAT_UNSPECIFIED',
- self::LEGACY => 'LEGACY',
- self::JSON => 'JSON',
- ];
-
- 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/DataprocMetastore/src/V1beta/UpdateFederationRequest.php b/DataprocMetastore/src/V1beta/UpdateFederationRequest.php
deleted file mode 100644
index 12db5f2d84a3..000000000000
--- a/DataprocMetastore/src/V1beta/UpdateFederationRequest.php
+++ /dev/null
@@ -1,215 +0,0 @@
-google.cloud.metastore.v1beta.UpdateFederationRequest
- */
-class UpdateFederationRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
- /**
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $federation = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @type \Google\Cloud\Metastore\V1beta\Federation $federation
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\MetastoreFederation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\Federation|null
- */
- public function getFederation()
- {
- return $this->federation;
- }
-
- public function hasFederation()
- {
- return isset($this->federation);
- }
-
- public function clearFederation()
- {
- unset($this->federation);
- }
-
- /**
- * Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore federation's `name` field is used to identify the
- * metastore service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Federation federation = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\Federation $var
- * @return $this
- */
- public function setFederation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Federation::class);
- $this->federation = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/UpdateMetadataImportRequest.php b/DataprocMetastore/src/V1beta/UpdateMetadataImportRequest.php
deleted file mode 100644
index 35e60aa3db85..000000000000
--- a/DataprocMetastore/src/V1beta/UpdateMetadataImportRequest.php
+++ /dev/null
@@ -1,216 +0,0 @@
-google.cloud.metastore.v1beta.UpdateMetadataImportRequest
- */
-class UpdateMetadataImportRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
- /**
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $metadata_import = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @type \Google\Cloud\Metastore\V1beta\MetadataImport $metadata_import
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\MetadataImport|null
- */
- public function getMetadataImport()
- {
- return $this->metadata_import;
- }
-
- public function hasMetadataImport()
- {
- return isset($this->metadata_import);
- }
-
- public function clearMetadataImport()
- {
- unset($this->metadata_import);
- }
-
- /**
- * Required. The metadata import to update. The server only merges fields
- * in the import if they are specified in `update_mask`.
- * The metadata import's `name` field is used to identify the metastore
- * import to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.MetadataImport metadata_import = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\MetadataImport $var
- * @return $this
- */
- public function setMetadataImport($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\MetadataImport::class);
- $this->metadata_import = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/UpdateServiceRequest.php b/DataprocMetastore/src/V1beta/UpdateServiceRequest.php
deleted file mode 100644
index 9be41ddacfb9..000000000000
--- a/DataprocMetastore/src/V1beta/UpdateServiceRequest.php
+++ /dev/null
@@ -1,216 +0,0 @@
-google.cloud.metastore.v1beta.UpdateServiceRequest
- */
-class UpdateServiceRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $update_mask = null;
- /**
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $service = null;
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $request_id = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\FieldMask $update_mask
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- * @type \Google\Cloud\Metastore\V1beta\Service $service
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- * @type string $request_id
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Metastore\V1Beta\Metastore::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update.
- * Fields specified in the `update_mask` are relative to the resource (not
- * to the full request). A field is overwritten if it is in the mask.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Metastore\V1beta\Service|null
- */
- public function getService()
- {
- return $this->service;
- }
-
- public function hasService()
- {
- return isset($this->service);
- }
-
- public function clearService()
- {
- unset($this->service);
- }
-
- /**
- * Required. The metastore service to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * The metastore service's `name` field is used to identify the metastore
- * service to be updated.
- *
- * Generated from protobuf field .google.cloud.metastore.v1beta.Service service = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Metastore\V1beta\Service $var
- * @return $this
- */
- public function setService($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Metastore\V1beta\Service::class);
- $this->service = $var;
-
- return $this;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Optional. A request ID. Specify a unique request ID to allow the server to
- * ignore the request if it has completed. The server will ignore subsequent
- * requests that provide a duplicate request ID for at least 60 minutes after
- * the first request.
- * For example, if an initial request times out, followed by another request
- * with the same request ID, the server ignores the second request to prevent
- * the creation of duplicate commitments.
- * The request ID must be a valid
- * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
- * A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- *
- * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/DataprocMetastore/src/V1beta/gapic_metadata.json b/DataprocMetastore/src/V1beta/gapic_metadata.json
deleted file mode 100644
index 1e01d02ccb35..000000000000
--- a/DataprocMetastore/src/V1beta/gapic_metadata.json
+++ /dev/null
@@ -1,197 +0,0 @@
-{
- "schema": "1.0",
- "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods",
- "language": "php",
- "protoPackage": "google.cloud.metastore.v1beta",
- "libraryPackage": "Google\\Cloud\\Metastore\\V1beta",
- "services": {
- "DataprocMetastore": {
- "clients": {
- "grpc": {
- "libraryClient": "DataprocMetastoreGapicClient",
- "rpcs": {
- "AlterMetadataResourceLocation": {
- "methods": [
- "alterMetadataResourceLocation"
- ]
- },
- "CreateBackup": {
- "methods": [
- "createBackup"
- ]
- },
- "CreateMetadataImport": {
- "methods": [
- "createMetadataImport"
- ]
- },
- "CreateService": {
- "methods": [
- "createService"
- ]
- },
- "DeleteBackup": {
- "methods": [
- "deleteBackup"
- ]
- },
- "DeleteService": {
- "methods": [
- "deleteService"
- ]
- },
- "ExportMetadata": {
- "methods": [
- "exportMetadata"
- ]
- },
- "GetBackup": {
- "methods": [
- "getBackup"
- ]
- },
- "GetMetadataImport": {
- "methods": [
- "getMetadataImport"
- ]
- },
- "GetService": {
- "methods": [
- "getService"
- ]
- },
- "ListBackups": {
- "methods": [
- "listBackups"
- ]
- },
- "ListMetadataImports": {
- "methods": [
- "listMetadataImports"
- ]
- },
- "ListServices": {
- "methods": [
- "listServices"
- ]
- },
- "MoveTableToDatabase": {
- "methods": [
- "moveTableToDatabase"
- ]
- },
- "QueryMetadata": {
- "methods": [
- "queryMetadata"
- ]
- },
- "RemoveIamPolicy": {
- "methods": [
- "removeIamPolicy"
- ]
- },
- "RestoreService": {
- "methods": [
- "restoreService"
- ]
- },
- "UpdateMetadataImport": {
- "methods": [
- "updateMetadataImport"
- ]
- },
- "UpdateService": {
- "methods": [
- "updateService"
- ]
- },
- "GetLocation": {
- "methods": [
- "getLocation"
- ]
- },
- "ListLocations": {
- "methods": [
- "listLocations"
- ]
- },
- "GetIamPolicy": {
- "methods": [
- "getIamPolicy"
- ]
- },
- "SetIamPolicy": {
- "methods": [
- "setIamPolicy"
- ]
- },
- "TestIamPermissions": {
- "methods": [
- "testIamPermissions"
- ]
- }
- }
- }
- }
- },
- "DataprocMetastoreFederation": {
- "clients": {
- "grpc": {
- "libraryClient": "DataprocMetastoreFederationGapicClient",
- "rpcs": {
- "CreateFederation": {
- "methods": [
- "createFederation"
- ]
- },
- "DeleteFederation": {
- "methods": [
- "deleteFederation"
- ]
- },
- "GetFederation": {
- "methods": [
- "getFederation"
- ]
- },
- "ListFederations": {
- "methods": [
- "listFederations"
- ]
- },
- "UpdateFederation": {
- "methods": [
- "updateFederation"
- ]
- },
- "GetLocation": {
- "methods": [
- "getLocation"
- ]
- },
- "ListLocations": {
- "methods": [
- "listLocations"
- ]
- },
- "GetIamPolicy": {
- "methods": [
- "getIamPolicy"
- ]
- },
- "SetIamPolicy": {
- "methods": [
- "setIamPolicy"
- ]
- },
- "TestIamPermissions": {
- "methods": [
- "testIamPermissions"
- ]
- }
- }
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_client_config.json b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_client_config.json
deleted file mode 100644
index f641af0265f2..000000000000
--- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_client_config.json
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- "interfaces": {
- "google.cloud.metastore.v1beta.DataprocMetastore": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_1_codes": [
- "UNAVAILABLE"
- ],
- "no_retry_1_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 1000,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 10000,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 60000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 60000,
- "total_timeout_millis": 60000
- }
- },
- "methods": {
- "AlterMetadataResourceLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "CreateBackup": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "CreateMetadataImport": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "CreateService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "DeleteBackup": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "DeleteService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "ExportMetadata": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetBackup": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetMetadataImport": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetService": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListBackups": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListMetadataImports": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListServices": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "MoveTableToDatabase": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "QueryMetadata": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "RemoveIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "RestoreService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "UpdateMetadataImport": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "UpdateService": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "GetLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "ListLocations": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- }
- }
- }
- }
-}
diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php
deleted file mode 100644
index 9a06002101d9..000000000000
--- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php
+++ /dev/null
@@ -1,201 +0,0 @@
- [
- 'google.cloud.metastore.v1beta.DataprocMetastore' => [
- 'AlterMetadataResourceLocation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\AlterMetadataResourceLocationResponse',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateBackup' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\Backup',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateMetadataImport' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\MetadataImport',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'CreateService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\Service',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteBackup' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ExportMetadata' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\MetadataExport',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'MoveTableToDatabase' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\MoveTableToDatabaseResponse',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'QueryMetadata' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\QueryMetadataResponse',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'RestoreService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\Restore',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpdateMetadataImport' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\MetadataImport',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpdateService' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\Service',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ListBackups' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getBackups',
- ],
- ],
- 'ListMetadataImports' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getMetadataImports',
- ],
- ],
- 'ListServices' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getServices',
- ],
- ],
- 'GetLocation' => [
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'ListLocations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getLocations',
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'GetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- ],
- ],
-];
diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_client_config.json b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_client_config.json
deleted file mode 100644
index 79bcf744ef44..000000000000
--- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_client_config.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "interfaces": {
- "google.cloud.metastore.v1beta.DataprocMetastoreFederation": {
- "retry_codes": {
- "no_retry_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- }
- },
- "methods": {
- "CreateFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "DeleteFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "GetFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "ListFederations": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "UpdateFederation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "GetLocation": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "ListLocations": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "GetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "SetIamPolicy": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- },
- "TestIamPermissions": {
- "timeout_millis": 60000,
- "retry_codes_name": "no_retry_codes",
- "retry_params_name": "no_retry_params"
- }
- }
- }
- }
-}
diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php
deleted file mode 100644
index c96ae408bbb7..000000000000
--- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php
+++ /dev/null
@@ -1,91 +0,0 @@
- [
- 'google.cloud.metastore.v1beta.DataprocMetastoreFederation' => [
- 'CreateFederation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\Federation',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'DeleteFederation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Protobuf\GPBEmpty',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'UpdateFederation' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Metastore\V1beta\Federation',
- 'metadataReturnType' => '\Google\Cloud\Metastore\V1beta\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'ListFederations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getFederations',
- ],
- ],
- 'GetLocation' => [
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'ListLocations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getLocations',
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'GetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'SetIamPolicy' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- 'TestIamPermissions' => [
- 'interfaceOverride' => 'google.iam.v1.IAMPolicy',
- ],
- ],
- ],
-];
diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php
deleted file mode 100644
index 687939a6e5a4..000000000000
--- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php
+++ /dev/null
@@ -1,263 +0,0 @@
- [
- 'google.cloud.location.Locations' => [
- 'GetLocation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListLocations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*}/locations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.cloud.metastore.v1beta.DataprocMetastoreFederation' => [
- 'CreateFederation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/federations',
- 'body' => 'federation',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'federation_id',
- ],
- ],
- 'DeleteFederation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/federations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetFederation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/federations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListFederations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/federations',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'UpdateFederation' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1beta/{federation.name=projects/*/locations/*/federations/*}',
- 'body' => 'federation',
- 'placeholders' => [
- 'federation.name' => [
- 'getters' => [
- 'getFederation',
- 'getName',
- ],
- ],
- ],
- 'queryParams' => [
- 'update_mask',
- ],
- ],
- ],
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/federations/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/federations/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/federations/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'CancelOperation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteOperation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php
deleted file mode 100644
index 848d3380831f..000000000000
--- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php
+++ /dev/null
@@ -1,436 +0,0 @@
- [
- 'google.cloud.location.Locations' => [
- 'GetLocation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListLocations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*}/locations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.cloud.metastore.v1beta.DataprocMetastore' => [
- 'AlterMetadataResourceLocation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{service=projects/*/locations/*/services/*}:alterLocation',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'CreateBackup' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/services/*}/backups',
- 'body' => 'backup',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'backup_id',
- ],
- ],
- 'CreateMetadataImport' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports',
- 'body' => 'metadata_import',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'metadata_import_id',
- ],
- ],
- 'CreateService' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/services',
- 'body' => 'service',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- 'queryParams' => [
- 'service_id',
- ],
- ],
- 'DeleteBackup' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/services/*/backups/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteService' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/services/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ExportMetadata' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{service=projects/*/locations/*/services/*}:exportMetadata',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'GetBackup' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/services/*/backups/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetMetadataImport' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/services/*/metadataImports/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetService' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/services/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListBackups' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/services/*}/backups',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListMetadataImports' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/services/*}/metadataImports',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListServices' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/services',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'MoveTableToDatabase' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{service=projects/*/locations/*/services/*}:moveTableToDatabase',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'QueryMetadata' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{service=projects/*/locations/*/services/*}:queryMetadata',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'RemoveIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/**}:removeIamPolicy',
- 'body' => '*',
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'RestoreService' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{service=projects/*/locations/*/services/*}:restore',
- 'body' => '*',
- 'placeholders' => [
- 'service' => [
- 'getters' => [
- 'getService',
- ],
- ],
- ],
- ],
- 'UpdateMetadataImport' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1beta/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}',
- 'body' => 'metadata_import',
- 'placeholders' => [
- 'metadata_import.name' => [
- 'getters' => [
- 'getMetadataImport',
- 'getName',
- ],
- ],
- ],
- 'queryParams' => [
- 'update_mask',
- ],
- ],
- 'UpdateService' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1beta/{service.name=projects/*/locations/*/services/*}',
- 'body' => 'service',
- 'placeholders' => [
- 'service.name' => [
- 'getters' => [
- 'getService',
- 'getName',
- ],
- ],
- ],
- 'queryParams' => [
- 'update_mask',
- ],
- ],
- ],
- 'google.iam.v1.IAMPolicy' => [
- 'GetIamPolicy' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*}:getIamPolicy',
- 'additionalBindings' => [
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:getIamPolicy',
- ],
- [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/federations/*}:getIamPolicy',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'SetIamPolicy' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*}:setIamPolicy',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:setIamPolicy',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/federations/*}:setIamPolicy',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- 'TestIamPermissions' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*}:testIamPermissions',
- 'body' => '*',
- 'additionalBindings' => [
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/backups/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/services/*/databases/*/tables/*}:testIamPermissions',
- 'body' => '*',
- ],
- [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{resource=projects/*/locations/*/federations/*}:testIamPermissions',
- 'body' => '*',
- ],
- ],
- 'placeholders' => [
- 'resource' => [
- 'getters' => [
- 'getResource',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'CancelOperation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteOperation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/DataprocMetastore/tests/Unit/V1alpha/DataprocMetastoreClientTest.php b/DataprocMetastore/tests/Unit/V1alpha/DataprocMetastoreClientTest.php
deleted file mode 100644
index 144bc3f63006..000000000000
--- a/DataprocMetastore/tests/Unit/V1alpha/DataprocMetastoreClientTest.php
+++ /dev/null
@@ -1,2364 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return DataprocMetastoreClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new DataprocMetastoreClient($options);
- }
-
- /** @test */
- public function alterMetadataResourceLocationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/alterMetadataResourceLocationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new AlterMetadataResourceLocationResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/alterMetadataResourceLocationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $resourceName = 'resourceName979421212';
- $locationUri = 'locationUri-57953822';
- $response = $gapicClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/AlterMetadataResourceLocation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getResourceName();
- $this->assertProtobufEquals($resourceName, $actualValue);
- $actualValue = $actualApiRequestObject->getLocationUri();
- $this->assertProtobufEquals($locationUri, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/alterMetadataResourceLocationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function alterMetadataResourceLocationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/alterMetadataResourceLocationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $resourceName = 'resourceName979421212';
- $locationUri = 'locationUri-57953822';
- $response = $gapicClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/alterMetadataResourceLocationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createBackupTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $description = 'description-1724546052';
- $expectedResponse = new Backup();
- $expectedResponse->setName($name);
- $expectedResponse->setDescription($description);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createBackupTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $backupId = 'backupId1355353272';
- $backup = new Backup();
- $response = $gapicClient->createBackup($formattedParent, $backupId, $backup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/CreateBackup', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getBackupId();
- $this->assertProtobufEquals($backupId, $actualValue);
- $actualValue = $actualApiRequestObject->getBackup();
- $this->assertProtobufEquals($backup, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createBackupTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createBackupExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $backupId = 'backupId1355353272';
- $backup = new Backup();
- $response = $gapicClient->createBackup($formattedParent, $backupId, $backup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createBackupTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createMetadataImportTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $description = 'description-1724546052';
- $expectedResponse = new MetadataImport();
- $expectedResponse->setName($name);
- $expectedResponse->setDescription($description);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createMetadataImportTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $metadataImportId = 'metadataImportId-476076315';
- $metadataImport = new MetadataImport();
- $response = $gapicClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/CreateMetadataImport', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getMetadataImportId();
- $this->assertProtobufEquals($metadataImportId, $actualValue);
- $actualValue = $actualApiRequestObject->getMetadataImport();
- $this->assertProtobufEquals($metadataImport, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createMetadataImportTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createMetadataImportExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $metadataImportId = 'metadataImportId-476076315';
- $metadataImport = new MetadataImport();
- $response = $gapicClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createMetadataImportTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $network = 'network1843485230';
- $endpointUri = 'endpointUri-850313278';
- $port = 3446913;
- $stateMessage = 'stateMessage29641305';
- $artifactGcsUri = 'artifactGcsUri1337121495';
- $uid = 'uid115792';
- $expectedResponse = new Service();
- $expectedResponse->setName($name);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setPort($port);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setArtifactGcsUri($artifactGcsUri);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $serviceId = 'serviceId-1724763419';
- $service = new Service();
- $response = $gapicClient->createService($formattedParent, $serviceId, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/CreateService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getServiceId();
- $this->assertProtobufEquals($serviceId, $actualValue);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($service, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $serviceId = 'serviceId-1724763419';
- $service = new Service();
- $response = $gapicClient->createService($formattedParent, $serviceId, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteBackupTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteBackupTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->deleteBackup($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/DeleteBackup', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteBackupTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteBackupExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->deleteBackup($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteBackupTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->deleteService($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/DeleteService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->deleteService($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function exportMetadataTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/exportMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $destinationGcsUri = 'destinationGcsUri1386421523';
- $expectedResponse = new MetadataExport();
- $expectedResponse->setDestinationGcsUri($destinationGcsUri);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/exportMetadataTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->exportMetadata($formattedService);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/ExportMetadata', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/exportMetadataTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function exportMetadataExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/exportMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->exportMetadata($formattedService);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/exportMetadataTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getBackupTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $description = 'description-1724546052';
- $expectedResponse = new Backup();
- $expectedResponse->setName($name2);
- $expectedResponse->setDescription($description);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->getBackup($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/GetBackup', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getBackupExceptionTest()
- {
- $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
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- try {
- $gapicClient->getBackup($formattedName);
- // 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 getMetadataImportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $description = 'description-1724546052';
- $expectedResponse = new MetadataImport();
- $expectedResponse->setName($name2);
- $expectedResponse->setDescription($description);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->metadataImportName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[METADATA_IMPORT]');
- $response = $gapicClient->getMetadataImport($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/GetMetadataImport', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getMetadataImportExceptionTest()
- {
- $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
- $formattedName = $gapicClient->metadataImportName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[METADATA_IMPORT]');
- try {
- $gapicClient->getMetadataImport($formattedName);
- // 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 getServiceTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $network = 'network1843485230';
- $endpointUri = 'endpointUri-850313278';
- $port = 3446913;
- $stateMessage = 'stateMessage29641305';
- $artifactGcsUri = 'artifactGcsUri1337121495';
- $uid = 'uid115792';
- $expectedResponse = new Service();
- $expectedResponse->setName($name2);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setPort($port);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setArtifactGcsUri($artifactGcsUri);
- $expectedResponse->setUid($uid);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->getService($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/GetService', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getServiceExceptionTest()
- {
- $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
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- try {
- $gapicClient->getService($formattedName);
- // 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 listBackupsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $backupsElement = new Backup();
- $backups = [
- $backupsElement,
- ];
- $expectedResponse = new ListBackupsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setBackups($backups);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->listBackups($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/ListBackups', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listBackupsExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- try {
- $gapicClient->listBackups($formattedParent);
- // 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 listMetadataImportsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $metadataImportsElement = new MetadataImport();
- $metadataImports = [
- $metadataImportsElement,
- ];
- $expectedResponse = new ListMetadataImportsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setMetadataImports($metadataImports);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->listMetadataImports($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getMetadataImports()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/ListMetadataImports', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listMetadataImportsExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- try {
- $gapicClient->listMetadataImports($formattedParent);
- // 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 listServicesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $servicesElement = new Service();
- $services = [
- $servicesElement,
- ];
- $expectedResponse = new ListServicesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setServices($services);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listServices($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getServices()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/ListServices', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listServicesExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listServices($formattedParent);
- // 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 moveTableToDatabaseTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/moveTableToDatabaseTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new MoveTableToDatabaseResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/moveTableToDatabaseTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $tableName = 'tableName-1504630692';
- $dbName = 'dbName1452819884';
- $destinationDbName = 'destinationDbName-1322761605';
- $response = $gapicClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/MoveTableToDatabase', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getTableName();
- $this->assertProtobufEquals($tableName, $actualValue);
- $actualValue = $actualApiRequestObject->getDbName();
- $this->assertProtobufEquals($dbName, $actualValue);
- $actualValue = $actualApiRequestObject->getDestinationDbName();
- $this->assertProtobufEquals($destinationDbName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/moveTableToDatabaseTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function moveTableToDatabaseExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/moveTableToDatabaseTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $tableName = 'tableName-1504630692';
- $dbName = 'dbName1452819884';
- $destinationDbName = 'destinationDbName-1322761605';
- $response = $gapicClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/moveTableToDatabaseTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function queryMetadataTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/queryMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $resultManifestUri = 'resultManifestUri-1050940354';
- $expectedResponse = new QueryMetadataResponse();
- $expectedResponse->setResultManifestUri($resultManifestUri);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/queryMetadataTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $query = 'query107944136';
- $response = $gapicClient->queryMetadata($formattedService, $query);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/QueryMetadata', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getQuery();
- $this->assertProtobufEquals($query, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/queryMetadataTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function queryMetadataExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/queryMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $query = 'query107944136';
- $response = $gapicClient->queryMetadata($formattedService, $query);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/queryMetadataTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function removeIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $success = false;
- $expectedResponse = new RemoveIamPolicyResponse();
- $expectedResponse->setSuccess($success);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->removeIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/RemoveIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function removeIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->removeIamPolicy($resource);
- // 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 restoreServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/restoreServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $backup2 = 'backup22121930997';
- $details = 'details1557721666';
- $expectedResponse = new Restore();
- $expectedResponse->setBackup($backup2);
- $expectedResponse->setDetails($details);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/restoreServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->restoreService($formattedService, $formattedBackup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/RestoreService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getBackup();
- $this->assertProtobufEquals($formattedBackup, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/restoreServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function restoreServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/restoreServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->restoreService($formattedService, $formattedBackup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/restoreServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateMetadataImportTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $description = 'description-1724546052';
- $expectedResponse = new MetadataImport();
- $expectedResponse->setName($name);
- $expectedResponse->setDescription($description);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateMetadataImportTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $updateMask = new FieldMask();
- $metadataImport = new MetadataImport();
- $response = $gapicClient->updateMetadataImport($updateMask, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/UpdateMetadataImport', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $actualValue = $actualApiRequestObject->getMetadataImport();
- $this->assertProtobufEquals($metadataImport, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateMetadataImportTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateMetadataImportExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $updateMask = new FieldMask();
- $metadataImport = new MetadataImport();
- $response = $gapicClient->updateMetadataImport($updateMask, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateMetadataImportTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $network = 'network1843485230';
- $endpointUri = 'endpointUri-850313278';
- $port = 3446913;
- $stateMessage = 'stateMessage29641305';
- $artifactGcsUri = 'artifactGcsUri1337121495';
- $uid = 'uid115792';
- $expectedResponse = new Service();
- $expectedResponse->setName($name);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setPort($port);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setArtifactGcsUri($artifactGcsUri);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $updateMask = new FieldMask();
- $service = new Service();
- $response = $gapicClient->updateService($updateMask, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastore/UpdateService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($service, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $updateMask = new FieldMask();
- $service = new Service();
- $response = $gapicClient->updateService($updateMask, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->getLocation();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $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);
- try {
- $gapicClient->getLocation();
- // 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 listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->listLocations();
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $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);
- try {
- $gapicClient->listLocations();
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}
diff --git a/DataprocMetastore/tests/Unit/V1alpha/DataprocMetastoreFederationClientTest.php b/DataprocMetastore/tests/Unit/V1alpha/DataprocMetastoreFederationClientTest.php
deleted file mode 100644
index 24167c33a732..000000000000
--- a/DataprocMetastore/tests/Unit/V1alpha/DataprocMetastoreFederationClientTest.php
+++ /dev/null
@@ -1,901 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return DataprocMetastoreFederationClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new DataprocMetastoreFederationClient($options);
- }
-
- /** @test */
- public function createFederationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $version = 'version351608024';
- $endpointUri = 'endpointUri-850313278';
- $stateMessage = 'stateMessage29641305';
- $uid = 'uid115792';
- $expectedResponse = new Federation();
- $expectedResponse->setName($name);
- $expectedResponse->setVersion($version);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createFederationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $federationId = 'federationId-1338699881';
- $federation = new Federation();
- $response = $gapicClient->createFederation($formattedParent, $federationId, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastoreFederation/CreateFederation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getFederationId();
- $this->assertProtobufEquals($federationId, $actualValue);
- $actualValue = $actualApiRequestObject->getFederation();
- $this->assertProtobufEquals($federation, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createFederationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createFederationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $federationId = 'federationId-1338699881';
- $federation = new Federation();
- $response = $gapicClient->createFederation($formattedParent, $federationId, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createFederationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteFederationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteFederationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- $response = $gapicClient->deleteFederation($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastoreFederation/DeleteFederation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteFederationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteFederationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- $response = $gapicClient->deleteFederation($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteFederationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getFederationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $version = 'version351608024';
- $endpointUri = 'endpointUri-850313278';
- $stateMessage = 'stateMessage29641305';
- $uid = 'uid115792';
- $expectedResponse = new Federation();
- $expectedResponse->setName($name2);
- $expectedResponse->setVersion($version);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setUid($uid);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- $response = $gapicClient->getFederation($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastoreFederation/GetFederation', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getFederationExceptionTest()
- {
- $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
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- try {
- $gapicClient->getFederation($formattedName);
- // 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 listFederationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $federationsElement = new Federation();
- $federations = [
- $federationsElement,
- ];
- $expectedResponse = new ListFederationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setFederations($federations);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listFederations($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getFederations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastoreFederation/ListFederations', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listFederationsExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listFederations($formattedParent);
- // 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 updateFederationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $version = 'version351608024';
- $endpointUri = 'endpointUri-850313278';
- $stateMessage = 'stateMessage29641305';
- $uid = 'uid115792';
- $expectedResponse = new Federation();
- $expectedResponse->setName($name);
- $expectedResponse->setVersion($version);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateFederationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $updateMask = new FieldMask();
- $federation = new Federation();
- $response = $gapicClient->updateFederation($updateMask, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1alpha.DataprocMetastoreFederation/UpdateFederation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $actualValue = $actualApiRequestObject->getFederation();
- $this->assertProtobufEquals($federation, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateFederationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateFederationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $updateMask = new FieldMask();
- $federation = new Federation();
- $response = $gapicClient->updateFederation($updateMask, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateFederationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->getLocation();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $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);
- try {
- $gapicClient->getLocation();
- // 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 listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->listLocations();
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $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);
- try {
- $gapicClient->listLocations();
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}
diff --git a/DataprocMetastore/tests/Unit/V1beta/DataprocMetastoreClientTest.php b/DataprocMetastore/tests/Unit/V1beta/DataprocMetastoreClientTest.php
deleted file mode 100644
index 97b0904a18ab..000000000000
--- a/DataprocMetastore/tests/Unit/V1beta/DataprocMetastoreClientTest.php
+++ /dev/null
@@ -1,2364 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return DataprocMetastoreClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new DataprocMetastoreClient($options);
- }
-
- /** @test */
- public function alterMetadataResourceLocationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/alterMetadataResourceLocationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new AlterMetadataResourceLocationResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/alterMetadataResourceLocationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $resourceName = 'resourceName979421212';
- $locationUri = 'locationUri-57953822';
- $response = $gapicClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/AlterMetadataResourceLocation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getResourceName();
- $this->assertProtobufEquals($resourceName, $actualValue);
- $actualValue = $actualApiRequestObject->getLocationUri();
- $this->assertProtobufEquals($locationUri, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/alterMetadataResourceLocationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function alterMetadataResourceLocationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/alterMetadataResourceLocationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $resourceName = 'resourceName979421212';
- $locationUri = 'locationUri-57953822';
- $response = $gapicClient->alterMetadataResourceLocation($formattedService, $resourceName, $locationUri);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/alterMetadataResourceLocationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createBackupTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $description = 'description-1724546052';
- $expectedResponse = new Backup();
- $expectedResponse->setName($name);
- $expectedResponse->setDescription($description);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createBackupTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $backupId = 'backupId1355353272';
- $backup = new Backup();
- $response = $gapicClient->createBackup($formattedParent, $backupId, $backup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/CreateBackup', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getBackupId();
- $this->assertProtobufEquals($backupId, $actualValue);
- $actualValue = $actualApiRequestObject->getBackup();
- $this->assertProtobufEquals($backup, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createBackupTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createBackupExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $backupId = 'backupId1355353272';
- $backup = new Backup();
- $response = $gapicClient->createBackup($formattedParent, $backupId, $backup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createBackupTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createMetadataImportTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $description = 'description-1724546052';
- $expectedResponse = new MetadataImport();
- $expectedResponse->setName($name);
- $expectedResponse->setDescription($description);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createMetadataImportTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $metadataImportId = 'metadataImportId-476076315';
- $metadataImport = new MetadataImport();
- $response = $gapicClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/CreateMetadataImport', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getMetadataImportId();
- $this->assertProtobufEquals($metadataImportId, $actualValue);
- $actualValue = $actualApiRequestObject->getMetadataImport();
- $this->assertProtobufEquals($metadataImport, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createMetadataImportTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createMetadataImportExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $metadataImportId = 'metadataImportId-476076315';
- $metadataImport = new MetadataImport();
- $response = $gapicClient->createMetadataImport($formattedParent, $metadataImportId, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createMetadataImportTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $network = 'network1843485230';
- $endpointUri = 'endpointUri-850313278';
- $port = 3446913;
- $stateMessage = 'stateMessage29641305';
- $artifactGcsUri = 'artifactGcsUri1337121495';
- $uid = 'uid115792';
- $expectedResponse = new Service();
- $expectedResponse->setName($name);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setPort($port);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setArtifactGcsUri($artifactGcsUri);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $serviceId = 'serviceId-1724763419';
- $service = new Service();
- $response = $gapicClient->createService($formattedParent, $serviceId, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/CreateService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getServiceId();
- $this->assertProtobufEquals($serviceId, $actualValue);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($service, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $serviceId = 'serviceId-1724763419';
- $service = new Service();
- $response = $gapicClient->createService($formattedParent, $serviceId, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteBackupTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteBackupTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->deleteBackup($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/DeleteBackup', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteBackupTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteBackupExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteBackupTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->deleteBackup($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteBackupTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->deleteService($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/DeleteService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->deleteService($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function exportMetadataTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/exportMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $destinationGcsUri = 'destinationGcsUri1386421523';
- $expectedResponse = new MetadataExport();
- $expectedResponse->setDestinationGcsUri($destinationGcsUri);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/exportMetadataTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->exportMetadata($formattedService);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/ExportMetadata', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/exportMetadataTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function exportMetadataExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/exportMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->exportMetadata($formattedService);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/exportMetadataTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getBackupTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $description = 'description-1724546052';
- $expectedResponse = new Backup();
- $expectedResponse->setName($name2);
- $expectedResponse->setDescription($description);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->getBackup($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/GetBackup', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getBackupExceptionTest()
- {
- $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
- $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- try {
- $gapicClient->getBackup($formattedName);
- // 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 getMetadataImportTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $description = 'description-1724546052';
- $expectedResponse = new MetadataImport();
- $expectedResponse->setName($name2);
- $expectedResponse->setDescription($description);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->metadataImportName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[METADATA_IMPORT]');
- $response = $gapicClient->getMetadataImport($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/GetMetadataImport', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getMetadataImportExceptionTest()
- {
- $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
- $formattedName = $gapicClient->metadataImportName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[METADATA_IMPORT]');
- try {
- $gapicClient->getMetadataImport($formattedName);
- // 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 getServiceTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $network = 'network1843485230';
- $endpointUri = 'endpointUri-850313278';
- $port = 3446913;
- $stateMessage = 'stateMessage29641305';
- $artifactGcsUri = 'artifactGcsUri1337121495';
- $uid = 'uid115792';
- $expectedResponse = new Service();
- $expectedResponse->setName($name2);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setPort($port);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setArtifactGcsUri($artifactGcsUri);
- $expectedResponse->setUid($uid);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->getService($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/GetService', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getServiceExceptionTest()
- {
- $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
- $formattedName = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- try {
- $gapicClient->getService($formattedName);
- // 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 listBackupsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $backupsElement = new Backup();
- $backups = [
- $backupsElement,
- ];
- $expectedResponse = new ListBackupsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setBackups($backups);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->listBackups($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/ListBackups', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listBackupsExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- try {
- $gapicClient->listBackups($formattedParent);
- // 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 listMetadataImportsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $metadataImportsElement = new MetadataImport();
- $metadataImports = [
- $metadataImportsElement,
- ];
- $expectedResponse = new ListMetadataImportsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setMetadataImports($metadataImports);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $response = $gapicClient->listMetadataImports($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getMetadataImports()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/ListMetadataImports', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listMetadataImportsExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- try {
- $gapicClient->listMetadataImports($formattedParent);
- // 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 listServicesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $servicesElement = new Service();
- $services = [
- $servicesElement,
- ];
- $expectedResponse = new ListServicesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setServices($services);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listServices($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getServices()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/ListServices', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listServicesExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listServices($formattedParent);
- // 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 moveTableToDatabaseTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/moveTableToDatabaseTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new MoveTableToDatabaseResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/moveTableToDatabaseTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $tableName = 'tableName-1504630692';
- $dbName = 'dbName1452819884';
- $destinationDbName = 'destinationDbName-1322761605';
- $response = $gapicClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/MoveTableToDatabase', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getTableName();
- $this->assertProtobufEquals($tableName, $actualValue);
- $actualValue = $actualApiRequestObject->getDbName();
- $this->assertProtobufEquals($dbName, $actualValue);
- $actualValue = $actualApiRequestObject->getDestinationDbName();
- $this->assertProtobufEquals($destinationDbName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/moveTableToDatabaseTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function moveTableToDatabaseExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/moveTableToDatabaseTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $tableName = 'tableName-1504630692';
- $dbName = 'dbName1452819884';
- $destinationDbName = 'destinationDbName-1322761605';
- $response = $gapicClient->moveTableToDatabase($formattedService, $tableName, $dbName, $destinationDbName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/moveTableToDatabaseTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function queryMetadataTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/queryMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $resultManifestUri = 'resultManifestUri-1050940354';
- $expectedResponse = new QueryMetadataResponse();
- $expectedResponse->setResultManifestUri($resultManifestUri);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/queryMetadataTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $query = 'query107944136';
- $response = $gapicClient->queryMetadata($formattedService, $query);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/QueryMetadata', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getQuery();
- $this->assertProtobufEquals($query, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/queryMetadataTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function queryMetadataExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/queryMetadataTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $query = 'query107944136';
- $response = $gapicClient->queryMetadata($formattedService, $query);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/queryMetadataTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function removeIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $success = false;
- $expectedResponse = new RemoveIamPolicyResponse();
- $expectedResponse->setSuccess($success);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->removeIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/RemoveIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function removeIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->removeIamPolicy($resource);
- // 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 restoreServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/restoreServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $backup2 = 'backup22121930997';
- $details = 'details1557721666';
- $expectedResponse = new Restore();
- $expectedResponse->setBackup($backup2);
- $expectedResponse->setDetails($details);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/restoreServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->restoreService($formattedService, $formattedBackup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/RestoreService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($formattedService, $actualValue);
- $actualValue = $actualApiRequestObject->getBackup();
- $this->assertProtobufEquals($formattedBackup, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/restoreServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function restoreServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/restoreServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedService = $gapicClient->serviceName('[PROJECT]', '[LOCATION]', '[SERVICE]');
- $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[SERVICE]', '[BACKUP]');
- $response = $gapicClient->restoreService($formattedService, $formattedBackup);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/restoreServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateMetadataImportTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $description = 'description-1724546052';
- $expectedResponse = new MetadataImport();
- $expectedResponse->setName($name);
- $expectedResponse->setDescription($description);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateMetadataImportTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $updateMask = new FieldMask();
- $metadataImport = new MetadataImport();
- $response = $gapicClient->updateMetadataImport($updateMask, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/UpdateMetadataImport', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $actualValue = $actualApiRequestObject->getMetadataImport();
- $this->assertProtobufEquals($metadataImport, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateMetadataImportTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateMetadataImportExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateMetadataImportTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $updateMask = new FieldMask();
- $metadataImport = new MetadataImport();
- $response = $gapicClient->updateMetadataImport($updateMask, $metadataImport);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateMetadataImportTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateServiceTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $network = 'network1843485230';
- $endpointUri = 'endpointUri-850313278';
- $port = 3446913;
- $stateMessage = 'stateMessage29641305';
- $artifactGcsUri = 'artifactGcsUri1337121495';
- $uid = 'uid115792';
- $expectedResponse = new Service();
- $expectedResponse->setName($name);
- $expectedResponse->setNetwork($network);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setPort($port);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setArtifactGcsUri($artifactGcsUri);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateServiceTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $updateMask = new FieldMask();
- $service = new Service();
- $response = $gapicClient->updateService($updateMask, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastore/UpdateService', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $actualValue = $actualApiRequestObject->getService();
- $this->assertProtobufEquals($service, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateServiceTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateServiceExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateServiceTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $updateMask = new FieldMask();
- $service = new Service();
- $response = $gapicClient->updateService($updateMask, $service);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateServiceTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->getLocation();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $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);
- try {
- $gapicClient->getLocation();
- // 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 listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->listLocations();
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $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);
- try {
- $gapicClient->listLocations();
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}
diff --git a/DataprocMetastore/tests/Unit/V1beta/DataprocMetastoreFederationClientTest.php b/DataprocMetastore/tests/Unit/V1beta/DataprocMetastoreFederationClientTest.php
deleted file mode 100644
index 21c131e16ea9..000000000000
--- a/DataprocMetastore/tests/Unit/V1beta/DataprocMetastoreFederationClientTest.php
+++ /dev/null
@@ -1,901 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return DataprocMetastoreFederationClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new DataprocMetastoreFederationClient($options);
- }
-
- /** @test */
- public function createFederationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $version = 'version351608024';
- $endpointUri = 'endpointUri-850313278';
- $stateMessage = 'stateMessage29641305';
- $uid = 'uid115792';
- $expectedResponse = new Federation();
- $expectedResponse->setName($name);
- $expectedResponse->setVersion($version);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createFederationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $federationId = 'federationId-1338699881';
- $federation = new Federation();
- $response = $gapicClient->createFederation($formattedParent, $federationId, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastoreFederation/CreateFederation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualApiRequestObject->getFederationId();
- $this->assertProtobufEquals($federationId, $actualValue);
- $actualValue = $actualApiRequestObject->getFederation();
- $this->assertProtobufEquals($federation, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createFederationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createFederationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $federationId = 'federationId-1338699881';
- $federation = new Federation();
- $response = $gapicClient->createFederation($formattedParent, $federationId, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createFederationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteFederationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new GPBEmpty();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteFederationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- $response = $gapicClient->deleteFederation($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastoreFederation/DeleteFederation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteFederationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteFederationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- $response = $gapicClient->deleteFederation($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteFederationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getFederationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $version = 'version351608024';
- $endpointUri = 'endpointUri-850313278';
- $stateMessage = 'stateMessage29641305';
- $uid = 'uid115792';
- $expectedResponse = new Federation();
- $expectedResponse->setName($name2);
- $expectedResponse->setVersion($version);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setUid($uid);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- $response = $gapicClient->getFederation($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastoreFederation/GetFederation', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getFederationExceptionTest()
- {
- $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
- $formattedName = $gapicClient->federationName('[PROJECT]', '[LOCATION]', '[FEDERATION]');
- try {
- $gapicClient->getFederation($formattedName);
- // 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 listFederationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $federationsElement = new Federation();
- $federations = [
- $federationsElement,
- ];
- $expectedResponse = new ListFederationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setFederations($federations);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listFederations($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getFederations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastoreFederation/ListFederations', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listFederationsExceptionTest()
- {
- $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
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listFederations($formattedParent);
- // 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 updateFederationTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $version = 'version351608024';
- $endpointUri = 'endpointUri-850313278';
- $stateMessage = 'stateMessage29641305';
- $uid = 'uid115792';
- $expectedResponse = new Federation();
- $expectedResponse->setName($name);
- $expectedResponse->setVersion($version);
- $expectedResponse->setEndpointUri($endpointUri);
- $expectedResponse->setStateMessage($stateMessage);
- $expectedResponse->setUid($uid);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateFederationTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $updateMask = new FieldMask();
- $federation = new Federation();
- $response = $gapicClient->updateFederation($updateMask, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.metastore.v1beta.DataprocMetastoreFederation/UpdateFederation', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getUpdateMask();
- $this->assertProtobufEquals($updateMask, $actualValue);
- $actualValue = $actualApiRequestObject->getFederation();
- $this->assertProtobufEquals($federation, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateFederationTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateFederationExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateFederationTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $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);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $updateMask = new FieldMask();
- $federation = new Federation();
- $response = $gapicClient->updateFederation($updateMask, $federation);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateFederationTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() 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 stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->getLocation();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $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);
- try {
- $gapicClient->getLocation();
- // 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 listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->listLocations();
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $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);
- try {
- $gapicClient->listLocations();
- // 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 getIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $response = $gapicClient->getIamPolicy($resource);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- try {
- $gapicClient->getIamPolicy($resource);
- // 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 setIamPolicyTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $version = 351608024;
- $etag = '21';
- $expectedResponse = new Policy();
- $expectedResponse->setVersion($version);
- $expectedResponse->setEtag($etag);
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $policy = new Policy();
- $response = $gapicClient->setIamPolicy($resource, $policy);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPolicy();
- $this->assertProtobufEquals($policy, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function setIamPolicyExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $policy = new Policy();
- try {
- $gapicClient->setIamPolicy($resource, $policy);
- // 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 testIamPermissionsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new TestIamPermissionsResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $resource = 'resource-341064690';
- $permissions = [];
- $response = $gapicClient->testIamPermissions($resource, $permissions);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall);
- $actualValue = $actualRequestObject->getResource();
- $this->assertProtobufEquals($resource, $actualValue);
- $actualValue = $actualRequestObject->getPermissions();
- $this->assertProtobufEquals($permissions, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function testIamPermissionsExceptionTest()
- {
- $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
- $resource = 'resource-341064690';
- $permissions = [];
- try {
- $gapicClient->testIamPermissions($resource, $permissions);
- // 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());
- }
-}