diff --git a/BigQueryMigration/metadata/V2/AssessmentTask.php b/BigQueryMigration/metadata/V2/AssessmentTask.php new file mode 100644 index 000000000000..89869a069794 --- /dev/null +++ b/BigQueryMigration/metadata/V2/AssessmentTask.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\x8F\x05\x0A8google/cloud/bigquery/migration/v2/assessment_task.proto\x12\"google.cloud.bigquery.migration.v2\"\xF6\x01\x0A\x15AssessmentTaskDetails\x12\x17\x0A\x0Ainput_path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1B\x0A\x0Eoutput_dataset\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x1B\x0A\x0Equerylogs_path\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdata_source\x18\x04 \x01(\x09B\x03\xE0A\x02\x12]\x0A\x0Efeature_handle\x18\x06 \x01(\x0B2;.google.cloud.bigquery.migration.v2.AssessmentFeatureHandleB\x03\xE0A\x01H\x00\x88\x01\x01B\x11\x0A\x0F_feature_handle\"\\\x0A\x17AssessmentFeatureHandle\x12'\x0A\x15add_shareable_dataset\x18\x01 \x01(\x08B\x03\xE0A\x01H\x00\x88\x01\x01B\x18\x0A\x16_add_shareable_datasetB\xCF\x01\x0A&com.google.cloud.bigquery.migration.v2B\x13AssessmentTaskProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xAA\x02\"Google.Cloud.BigQuery.Migration.V2\xCA\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/BigQueryMigration/metadata/V2/MigrationEntities.php b/BigQueryMigration/metadata/V2/MigrationEntities.php index d31661535e94..94a42b94cfce 100644 --- a/BigQueryMigration/metadata/V2/MigrationEntities.php +++ b/BigQueryMigration/metadata/V2/MigrationEntities.php @@ -16,6 +16,7 @@ public static function initOnce() { } \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\AssessmentTask::initOnce(); \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationErrorDetails::initOnce(); \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\MigrationMetrics::initOnce(); \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce(); @@ -24,7 +25,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); \GPBMetadata\Google\Rpc\ErrorDetails::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xB4\x1A\x0A;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1A\x19google/api/resource.proto\x1A@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1A:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1A;google/cloud/bigquery/migration/v2/translation_config.proto\x1Agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/rpc/error_details.proto\"\xF6\x04\x0A\x11MigrationWorkflow\x12\x17\x0A\x04name\x18\x01 \x01(\x09B\x09\xE0A\x03\xE0A\x05\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x06 \x01(\x09\x12O\x0A\x05tasks\x18\x02 \x03(\x0B2@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\x0A\x05state\x18\x03 \x01(\x0E2;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xE0A\x03\x12/\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10last_update_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A_\x0A\x0ATasksEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12@\x0A\x05value\x18\x02 \x01(\x0B21.google.cloud.bigquery.migration.v2.MigrationTask:\x028\x01\"Q\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05DRAFT\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0A\x0A\x06PAUSED\x10\x03\x12\x0D\x0A\x09COMPLETED\x10\x04:u\xEAAr\x0A2bigquerymigration.googleapis.com/MigrationWorkflow\x12google/cloud/bigquery/migration/v2/translation_usability.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/rpc/error_details.proto\"\x80\x05\x0A\x11MigrationWorkflow\x12\x17\x0A\x04name\x18\x01 \x01(\x09B\x09\xE0A\x03\xE0A\x05\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x06 \x01(\x09\x12O\x0A\x05tasks\x18\x02 \x03(\x0B2@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\x0A\x05state\x18\x03 \x01(\x0E2;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x129\x0A\x10last_update_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1A_\x0A\x0ATasksEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12@\x0A\x05value\x18\x02 \x01(\x0B21.google.cloud.bigquery.migration.v2.MigrationTask:\x028\x01\"Q\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05DRAFT\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0A\x0A\x06PAUSED\x10\x03\x12\x0D\x0A\x09COMPLETED\x10\x04:u\xEAAr\x0A2bigquerymigration.googleapis.com/MigrationWorkflow\x12internalAddGeneratedFile( - "\x0A\xF6\x08\x0A\x0A\x07literal\x18\x02 \x01(\x0B2+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x15\x0A\x08encoding\x18\x03 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06source\"#\x0A\x0ATargetSpec\x12\x15\x0A\x0Drelative_path\x18\x01 \x01(\x09\"h\x0A\x07Literal\x12\x18\x0A\x0Eliteral_string\x18\x02 \x01(\x09H\x00\x12\x17\x0A\x0Dliteral_bytes\x18\x03 \x01(\x0CH\x00\x12\x1A\x0A\x0Drelative_path\x18\x01 \x01(\x09B\x03\xE0A\x02B\x0E\x0A\x0Cliteral_data\"n\x0A\x11SourceEnvironment\x12\x18\x0A\x10default_database\x18\x01 \x01(\x09\x12\x1A\x0A\x12schema_search_path\x18\x02 \x03(\x09\x12#\x0A\x16metadata_store_dataset\x18\x03 \x01(\x09B\x03\xE0A\x01B\xD3\x01\x0A&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xAA\x02\"Google.Cloud.BigQuery.Migration.V2\xCA\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + "\x0A\xCA\x0D\x0A\x0A\x07literal\x18\x02 \x01(\x0B2+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x17\x0A\x0Dgcs_file_path\x18\x04 \x01(\x09H\x00\x12\x15\x0A\x08encoding\x18\x03 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06source\"#\x0A\x0ATargetSpec\x12\x15\x0A\x0Drelative_path\x18\x01 \x01(\x09\"h\x0A\x07Literal\x12\x18\x0A\x0Eliteral_string\x18\x02 \x01(\x09H\x00\x12\x17\x0A\x0Dliteral_bytes\x18\x03 \x01(\x0CH\x00\x12\x1A\x0A\x0Drelative_path\x18\x01 \x01(\x09B\x03\xE0A\x02B\x0E\x0A\x0Cliteral_data\"n\x0A\x11SourceEnvironment\x12\x18\x0A\x10default_database\x18\x01 \x01(\x09\x12\x1A\x0A\x12schema_search_path\x18\x02 \x03(\x09\x12#\x0A\x16metadata_store_dataset\x18\x03 \x01(\x09B\x03\xE0A\x01B\xD3\x01\x0A&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xAA\x02\"Google.Cloud.BigQuery.Migration.V2\xCA\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" , true); static::$is_initialized = true; diff --git a/BigQueryMigration/src/V2/AssessmentFeatureHandle.php b/BigQueryMigration/src/V2/AssessmentFeatureHandle.php new file mode 100644 index 000000000000..74b25babd9ff --- /dev/null +++ b/BigQueryMigration/src/V2/AssessmentFeatureHandle.php @@ -0,0 +1,81 @@ +google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + */ +class AssessmentFeatureHandle extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to create a dataset containing non-PII data in addition + * to the output dataset. + * + * Generated from protobuf field optional bool add_shareable_dataset = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $add_shareable_dataset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $add_shareable_dataset + * Optional. Whether to create a dataset containing non-PII data in addition + * to the output dataset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\AssessmentTask::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to create a dataset containing non-PII data in addition + * to the output dataset. + * + * Generated from protobuf field optional bool add_shareable_dataset = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAddShareableDataset() + { + return isset($this->add_shareable_dataset) ? $this->add_shareable_dataset : false; + } + + public function hasAddShareableDataset() + { + return isset($this->add_shareable_dataset); + } + + public function clearAddShareableDataset() + { + unset($this->add_shareable_dataset); + } + + /** + * Optional. Whether to create a dataset containing non-PII data in addition + * to the output dataset. + * + * Generated from protobuf field optional bool add_shareable_dataset = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAddShareableDataset($var) + { + GPBUtil::checkBool($var); + $this->add_shareable_dataset = $var; + + return $this; + } + +} + diff --git a/BigQueryMigration/src/V2/AssessmentTaskDetails.php b/BigQueryMigration/src/V2/AssessmentTaskDetails.php new file mode 100644 index 000000000000..b8398f99ccbc --- /dev/null +++ b/BigQueryMigration/src/V2/AssessmentTaskDetails.php @@ -0,0 +1,221 @@ +google.cloud.bigquery.migration.v2.AssessmentTaskDetails + */ +class AssessmentTaskDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud Storage path for assessment input files. + * + * Generated from protobuf field string input_path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_path = ''; + /** + * Required. The BigQuery dataset for output. + * + * Generated from protobuf field string output_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_dataset = ''; + /** + * Optional. An optional Cloud Storage path to write the query logs (which is + * then used as an input path on the translation task) + * + * Generated from protobuf field string querylogs_path = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $querylogs_path = ''; + /** + * Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + * from which the input data is extracted. + * + * Generated from protobuf field string data_source = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_source = ''; + /** + * Optional. A collection of additional feature flags for this assessment. + * + * Generated from protobuf field optional .google.cloud.bigquery.migration.v2.AssessmentFeatureHandle feature_handle = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $feature_handle = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_path + * Required. The Cloud Storage path for assessment input files. + * @type string $output_dataset + * Required. The BigQuery dataset for output. + * @type string $querylogs_path + * Optional. An optional Cloud Storage path to write the query logs (which is + * then used as an input path on the translation task) + * @type string $data_source + * Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + * from which the input data is extracted. + * @type \Google\Cloud\BigQuery\Migration\V2\AssessmentFeatureHandle $feature_handle + * Optional. A collection of additional feature flags for this assessment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\AssessmentTask::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud Storage path for assessment input files. + * + * Generated from protobuf field string input_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInputPath() + { + return $this->input_path; + } + + /** + * Required. The Cloud Storage path for assessment input files. + * + * Generated from protobuf field string input_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInputPath($var) + { + GPBUtil::checkString($var, True); + $this->input_path = $var; + + return $this; + } + + /** + * Required. The BigQuery dataset for output. + * + * Generated from protobuf field string output_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOutputDataset() + { + return $this->output_dataset; + } + + /** + * Required. The BigQuery dataset for output. + * + * Generated from protobuf field string output_dataset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOutputDataset($var) + { + GPBUtil::checkString($var, True); + $this->output_dataset = $var; + + return $this; + } + + /** + * Optional. An optional Cloud Storage path to write the query logs (which is + * then used as an input path on the translation task) + * + * Generated from protobuf field string querylogs_path = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getQuerylogsPath() + { + return $this->querylogs_path; + } + + /** + * Optional. An optional Cloud Storage path to write the query logs (which is + * then used as an input path on the translation task) + * + * Generated from protobuf field string querylogs_path = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setQuerylogsPath($var) + { + GPBUtil::checkString($var, True); + $this->querylogs_path = $var; + + return $this; + } + + /** + * Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + * from which the input data is extracted. + * + * Generated from protobuf field string data_source = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataSource() + { + return $this->data_source; + } + + /** + * Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + * from which the input data is extracted. + * + * Generated from protobuf field string data_source = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataSource($var) + { + GPBUtil::checkString($var, True); + $this->data_source = $var; + + return $this; + } + + /** + * Optional. A collection of additional feature flags for this assessment. + * + * Generated from protobuf field optional .google.cloud.bigquery.migration.v2.AssessmentFeatureHandle feature_handle = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Migration\V2\AssessmentFeatureHandle|null + */ + public function getFeatureHandle() + { + return $this->feature_handle; + } + + public function hasFeatureHandle() + { + return isset($this->feature_handle); + } + + public function clearFeatureHandle() + { + unset($this->feature_handle); + } + + /** + * Optional. A collection of additional feature flags for this assessment. + * + * Generated from protobuf field optional .google.cloud.bigquery.migration.v2.AssessmentFeatureHandle feature_handle = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Migration\V2\AssessmentFeatureHandle $var + * @return $this + */ + public function setFeatureHandle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\AssessmentFeatureHandle::class); + $this->feature_handle = $var; + + return $this; + } + +} + diff --git a/BigQueryMigration/src/V2/MigrationSubtask.php b/BigQueryMigration/src/V2/MigrationSubtask.php index f7d0f5f056fe..d633f8f24317 100644 --- a/BigQueryMigration/src/V2/MigrationSubtask.php +++ b/BigQueryMigration/src/V2/MigrationSubtask.php @@ -62,30 +62,30 @@ class MigrationSubtask extends \Google\Protobuf\Internal\Message */ private $resource_error_details; /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * - * Generated from protobuf field int32 resource_error_count = 13; + * Generated from protobuf field int32 resource_error_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $resource_error_count = 0; /** - * Time when the subtask was created. + * Output only. Time when the subtask was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $create_time = null; /** - * Time when the subtask was last updated. + * Output only. Time when the subtask was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $last_update_time = null; /** - * The metrics for the subtask. + * Output only. The metrics for the subtask. * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $metrics; @@ -116,16 +116,16 @@ class MigrationSubtask extends \Google\Protobuf\Internal\Message * processing the subtask. Presence of error details does not mean that the * subtask failed. * @type int $resource_error_count - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * @type \Google\Protobuf\Timestamp $create_time - * Time when the subtask was created. + * Output only. Time when the subtask was created. * @type \Google\Protobuf\Timestamp $last_update_time - * Time when the subtask was last updated. + * Output only. Time when the subtask was last updated. * @type \Google\Cloud\BigQuery\Migration\V2\TimeSeries[] $metrics - * The metrics for the subtask. + * Output only. The metrics for the subtask. * } */ public function __construct($data = NULL) { @@ -316,12 +316,12 @@ public function setResourceErrorDetails($var) } /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * - * Generated from protobuf field int32 resource_error_count = 13; + * Generated from protobuf field int32 resource_error_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getResourceErrorCount() @@ -330,12 +330,12 @@ public function getResourceErrorCount() } /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * - * Generated from protobuf field int32 resource_error_count = 13; + * Generated from protobuf field int32 resource_error_count = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ @@ -348,9 +348,9 @@ public function setResourceErrorCount($var) } /** - * Time when the subtask was created. + * Output only. Time when the subtask was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getCreateTime() @@ -369,9 +369,9 @@ public function clearCreateTime() } /** - * Time when the subtask was created. + * Output only. Time when the subtask was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ @@ -384,9 +384,9 @@ public function setCreateTime($var) } /** - * Time when the subtask was last updated. + * Output only. Time when the subtask was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getLastUpdateTime() @@ -405,9 +405,9 @@ public function clearLastUpdateTime() } /** - * Time when the subtask was last updated. + * Output only. Time when the subtask was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ @@ -420,9 +420,9 @@ public function setLastUpdateTime($var) } /** - * The metrics for the subtask. + * Output only. The metrics for the subtask. * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return RepeatedField<\Google\Cloud\BigQuery\Migration\V2\TimeSeries> */ public function getMetrics() @@ -431,9 +431,9 @@ public function getMetrics() } /** - * The metrics for the subtask. + * Output only. The metrics for the subtask. * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11; + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\BigQuery\Migration\V2\TimeSeries[] $var * @return $this */ diff --git a/BigQueryMigration/src/V2/MigrationTask.php b/BigQueryMigration/src/V2/MigrationTask.php index 3706c78bb408..70dbf6fb2156 100644 --- a/BigQueryMigration/src/V2/MigrationTask.php +++ b/BigQueryMigration/src/V2/MigrationTask.php @@ -24,13 +24,19 @@ class MigrationTask extends \Google\Protobuf\Internal\Message */ protected $id = ''; /** - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * The type of the task. This must be one of the supported task types. + * Assessment: + * - `Assessment_Hive` - Assessment for Hive. + * - `Assessment_Redshift` - Assessment for Redshift. + * - `Assessment_Snowflake` - Assessment for Snowflake. + * - `Assessment_Teradata_v2` - Assessment for Teradata. + * - `Assessment_Oracle` - Assessment for Oracle. + * - `Assessment_Hadoop` - Assessment for Hadoop. + * - `Assessment_Informatica` - Assessment for Informatica. + * Translation: + * See [Supported Task + * Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + * for a list of supported task types. * * Generated from protobuf field string type = 2; */ @@ -49,15 +55,15 @@ class MigrationTask extends \Google\Protobuf\Internal\Message */ protected $processing_error = null; /** - * Time when the task was created. + * Output only. Time when the task was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $create_time = null; /** - * Time when the task was last updated. + * Output only. Time when the task was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $last_update_time = null; /** @@ -69,18 +75,18 @@ class MigrationTask extends \Google\Protobuf\Internal\Message */ private $resource_error_details; /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * - * Generated from protobuf field int32 resource_error_count = 18; + * Generated from protobuf field int32 resource_error_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $resource_error_count = 0; /** - * The metrics for the task. + * Output only. The metrics for the task. * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $metrics; /** @@ -90,15 +96,17 @@ class MigrationTask extends \Google\Protobuf\Internal\Message */ protected $task_result = null; /** - * Count of all the processing errors in this task and its subtasks. + * Output only. Count of all the processing errors in this task and its + * subtasks. * - * Generated from protobuf field int32 total_processing_error_count = 21; + * Generated from protobuf field int32 total_processing_error_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $total_processing_error_count = 0; /** - * Count of all the resource errors in this task and its subtasks. + * Output only. Count of all the resource errors in this task and its + * subtasks. * - * Generated from protobuf field int32 total_resource_error_count = 22; + * Generated from protobuf field int32 total_resource_error_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $total_resource_error_count = 0; protected $task_details; @@ -109,6 +117,8 @@ class MigrationTask extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type \Google\Cloud\BigQuery\Migration\V2\AssessmentTaskDetails $assessment_task_details + * Task configuration for Assessment. * @type \Google\Cloud\BigQuery\Migration\V2\TranslationConfigDetails $translation_config_details * Task configuration for CW Batch/Offline SQL Translation. * @type \Google\Cloud\BigQuery\Migration\V2\TranslationDetails $translation_details @@ -117,39 +127,47 @@ class MigrationTask extends \Google\Protobuf\Internal\Message * Output only. Immutable. The unique identifier for the migration task. The * ID is server-generated. * @type string $type - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * The type of the task. This must be one of the supported task types. + * Assessment: + * - `Assessment_Hive` - Assessment for Hive. + * - `Assessment_Redshift` - Assessment for Redshift. + * - `Assessment_Snowflake` - Assessment for Snowflake. + * - `Assessment_Teradata_v2` - Assessment for Teradata. + * - `Assessment_Oracle` - Assessment for Oracle. + * - `Assessment_Hadoop` - Assessment for Hadoop. + * - `Assessment_Informatica` - Assessment for Informatica. + * Translation: + * See [Supported Task + * Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + * for a list of supported task types. * @type int $state * Output only. The current state of the task. * @type \Google\Rpc\ErrorInfo $processing_error * Output only. An explanation that may be populated when the task is in * FAILED state. * @type \Google\Protobuf\Timestamp $create_time - * Time when the task was created. + * Output only. Time when the task was created. * @type \Google\Protobuf\Timestamp $last_update_time - * Time when the task was last updated. + * Output only. Time when the task was last updated. * @type \Google\Cloud\BigQuery\Migration\V2\ResourceErrorDetail[] $resource_error_details * Output only. Provides details to errors and issues encountered while * processing the task. Presence of error details does not mean that the task * failed. * @type int $resource_error_count - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * @type \Google\Cloud\BigQuery\Migration\V2\TimeSeries[] $metrics - * The metrics for the task. + * Output only. The metrics for the task. * @type \Google\Cloud\BigQuery\Migration\V2\MigrationTaskResult $task_result * Output only. The result of the task. * @type int $total_processing_error_count - * Count of all the processing errors in this task and its subtasks. + * Output only. Count of all the processing errors in this task and its + * subtasks. * @type int $total_resource_error_count - * Count of all the resource errors in this task and its subtasks. + * Output only. Count of all the resource errors in this task and its + * subtasks. * } */ public function __construct($data = NULL) { @@ -157,6 +175,37 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * Task configuration for Assessment. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.AssessmentTaskDetails assessment_task_details = 12; + * @return \Google\Cloud\BigQuery\Migration\V2\AssessmentTaskDetails|null + */ + public function getAssessmentTaskDetails() + { + return $this->readOneof(12); + } + + public function hasAssessmentTaskDetails() + { + return $this->hasOneof(12); + } + + /** + * Task configuration for Assessment. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.AssessmentTaskDetails assessment_task_details = 12; + * @param \Google\Cloud\BigQuery\Migration\V2\AssessmentTaskDetails $var + * @return $this + */ + public function setAssessmentTaskDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\AssessmentTaskDetails::class); + $this->writeOneof(12, $var); + + return $this; + } + /** * Task configuration for CW Batch/Offline SQL Translation. * @@ -248,13 +297,19 @@ public function setId($var) } /** - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * The type of the task. This must be one of the supported task types. + * Assessment: + * - `Assessment_Hive` - Assessment for Hive. + * - `Assessment_Redshift` - Assessment for Redshift. + * - `Assessment_Snowflake` - Assessment for Snowflake. + * - `Assessment_Teradata_v2` - Assessment for Teradata. + * - `Assessment_Oracle` - Assessment for Oracle. + * - `Assessment_Hadoop` - Assessment for Hadoop. + * - `Assessment_Informatica` - Assessment for Informatica. + * Translation: + * See [Supported Task + * Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + * for a list of supported task types. * * Generated from protobuf field string type = 2; * @return string @@ -265,13 +320,19 @@ public function getType() } /** - * The type of the task. This must be one of the supported task types: - * Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - * Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - * Translation_Snowflake2BQ, Translation_Netezza2BQ, - * Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - * Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - * Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + * The type of the task. This must be one of the supported task types. + * Assessment: + * - `Assessment_Hive` - Assessment for Hive. + * - `Assessment_Redshift` - Assessment for Redshift. + * - `Assessment_Snowflake` - Assessment for Snowflake. + * - `Assessment_Teradata_v2` - Assessment for Teradata. + * - `Assessment_Oracle` - Assessment for Oracle. + * - `Assessment_Hadoop` - Assessment for Hadoop. + * - `Assessment_Informatica` - Assessment for Informatica. + * Translation: + * See [Supported Task + * Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + * for a list of supported task types. * * Generated from protobuf field string type = 2; * @param string $var @@ -350,9 +411,9 @@ public function setProcessingError($var) } /** - * Time when the task was created. + * Output only. Time when the task was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getCreateTime() @@ -371,9 +432,9 @@ public function clearCreateTime() } /** - * Time when the task was created. + * Output only. Time when the task was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ @@ -386,9 +447,9 @@ public function setCreateTime($var) } /** - * Time when the task was last updated. + * Output only. Time when the task was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getLastUpdateTime() @@ -407,9 +468,9 @@ public function clearLastUpdateTime() } /** - * Time when the task was last updated. + * Output only. Time when the task was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ @@ -452,12 +513,12 @@ public function setResourceErrorDetails($var) } /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * - * Generated from protobuf field int32 resource_error_count = 18; + * Generated from protobuf field int32 resource_error_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getResourceErrorCount() @@ -466,12 +527,12 @@ public function getResourceErrorCount() } /** - * The number or resources with errors. Note: This is not the total - * number of errors as each resource can have more than one error. - * This is used to indicate truncation by having a `resource_error_count` - * that is higher than the size of `resource_error_details`. + * Output only. The number or resources with errors. Note: This is not the + * total number of errors as each resource can have more than one error. This + * is used to indicate truncation by having a `resource_error_count` that is + * higher than the size of `resource_error_details`. * - * Generated from protobuf field int32 resource_error_count = 18; + * Generated from protobuf field int32 resource_error_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ @@ -484,9 +545,9 @@ public function setResourceErrorCount($var) } /** - * The metrics for the task. + * Output only. The metrics for the task. * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return RepeatedField<\Google\Cloud\BigQuery\Migration\V2\TimeSeries> */ public function getMetrics() @@ -495,9 +556,9 @@ public function getMetrics() } /** - * The metrics for the task. + * Output only. The metrics for the task. * - * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19; + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.TimeSeries metrics = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Cloud\BigQuery\Migration\V2\TimeSeries[] $var * @return $this */ @@ -546,9 +607,10 @@ public function setTaskResult($var) } /** - * Count of all the processing errors in this task and its subtasks. + * Output only. Count of all the processing errors in this task and its + * subtasks. * - * Generated from protobuf field int32 total_processing_error_count = 21; + * Generated from protobuf field int32 total_processing_error_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getTotalProcessingErrorCount() @@ -557,9 +619,10 @@ public function getTotalProcessingErrorCount() } /** - * Count of all the processing errors in this task and its subtasks. + * Output only. Count of all the processing errors in this task and its + * subtasks. * - * Generated from protobuf field int32 total_processing_error_count = 21; + * Generated from protobuf field int32 total_processing_error_count = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ @@ -572,9 +635,10 @@ public function setTotalProcessingErrorCount($var) } /** - * Count of all the resource errors in this task and its subtasks. + * Output only. Count of all the resource errors in this task and its + * subtasks. * - * Generated from protobuf field int32 total_resource_error_count = 22; + * Generated from protobuf field int32 total_resource_error_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getTotalResourceErrorCount() @@ -583,9 +647,10 @@ public function getTotalResourceErrorCount() } /** - * Count of all the resource errors in this task and its subtasks. + * Output only. Count of all the resource errors in this task and its + * subtasks. * - * Generated from protobuf field int32 total_resource_error_count = 22; + * Generated from protobuf field int32 total_resource_error_count = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ diff --git a/BigQueryMigration/src/V2/MigrationTask/State.php b/BigQueryMigration/src/V2/MigrationTask/State.php index 79a22dfebe03..6aa47c9b9b81 100644 --- a/BigQueryMigration/src/V2/MigrationTask/State.php +++ b/BigQueryMigration/src/V2/MigrationTask/State.php @@ -38,7 +38,7 @@ class State */ const RUNNING = 3; /** - * Tha task is paused. Assigned subtasks can continue, but no new subtasks + * The task is paused. Assigned subtasks can continue, but no new subtasks * will be scheduled. * * Generated from protobuf enum PAUSED = 4; diff --git a/BigQueryMigration/src/V2/MigrationWorkflow.php b/BigQueryMigration/src/V2/MigrationWorkflow.php index 31090616ed27..89111264b873 100644 --- a/BigQueryMigration/src/V2/MigrationWorkflow.php +++ b/BigQueryMigration/src/V2/MigrationWorkflow.php @@ -46,15 +46,15 @@ class MigrationWorkflow extends \Google\Protobuf\Internal\Message */ protected $state = 0; /** - * Time when the workflow was created. + * Output only. Time when the workflow was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $create_time = null; /** - * Time when the workflow was last updated. + * Output only. Time when the workflow was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $last_update_time = null; @@ -78,9 +78,9 @@ class MigrationWorkflow extends \Google\Protobuf\Internal\Message * @type int $state * Output only. That status of the workflow. * @type \Google\Protobuf\Timestamp $create_time - * Time when the workflow was created. + * Output only. Time when the workflow was created. * @type \Google\Protobuf\Timestamp $last_update_time - * Time when the workflow was last updated. + * Output only. Time when the workflow was last updated. * } */ public function __construct($data = NULL) { @@ -203,9 +203,9 @@ public function setState($var) } /** - * Time when the workflow was created. + * Output only. Time when the workflow was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getCreateTime() @@ -224,9 +224,9 @@ public function clearCreateTime() } /** - * Time when the workflow was created. + * Output only. Time when the workflow was created. * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ @@ -239,9 +239,9 @@ public function setCreateTime($var) } /** - * Time when the workflow was last updated. + * Output only. Time when the workflow was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null */ public function getLastUpdateTime() @@ -260,9 +260,9 @@ public function clearLastUpdateTime() } /** - * Time when the workflow was last updated. + * Output only. Time when the workflow was last updated. * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5; + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var * @return $this */ diff --git a/BigQueryMigration/src/V2/SourceSpec.php b/BigQueryMigration/src/V2/SourceSpec.php index f4f281f2a7d7..522af4edaa58 100644 --- a/BigQueryMigration/src/V2/SourceSpec.php +++ b/BigQueryMigration/src/V2/SourceSpec.php @@ -33,6 +33,8 @@ class SourceSpec extends \Google\Protobuf\Internal\Message * The base URI for all files to be read in as sources for translation. * @type \Google\Cloud\BigQuery\Migration\V2\Literal $literal * Source literal. + * @type string $gcs_file_path + * The path to a single source file in Cloud Storage. * @type string $encoding * Optional. The optional field to specify the encoding of the sql bytes. * } @@ -104,6 +106,37 @@ public function setLiteral($var) return $this; } + /** + * The path to a single source file in Cloud Storage. + * + * Generated from protobuf field string gcs_file_path = 4; + * @return string + */ + public function getGcsFilePath() + { + return $this->readOneof(4); + } + + public function hasGcsFilePath() + { + return $this->hasOneof(4); + } + + /** + * The path to a single source file in Cloud Storage. + * + * Generated from protobuf field string gcs_file_path = 4; + * @param string $var + * @return $this + */ + public function setGcsFilePath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + /** * Optional. The optional field to specify the encoding of the sql bytes. * diff --git a/BigQueryMigration/src/V2/SuggestionConfig.php b/BigQueryMigration/src/V2/SuggestionConfig.php new file mode 100644 index 000000000000..477085e215c3 --- /dev/null +++ b/BigQueryMigration/src/V2/SuggestionConfig.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.migration.v2.SuggestionConfig + */ +class SuggestionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The list of suggestion steps to skip. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SuggestionStep skip_suggestion_steps = 1; + */ + private $skip_suggestion_steps; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Migration\V2\SuggestionStep[] $skip_suggestion_steps + * The list of suggestion steps to skip. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The list of suggestion steps to skip. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SuggestionStep skip_suggestion_steps = 1; + * @return RepeatedField<\Google\Cloud\BigQuery\Migration\V2\SuggestionStep> + */ + public function getSkipSuggestionSteps() + { + return $this->skip_suggestion_steps; + } + + /** + * The list of suggestion steps to skip. + * + * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.SuggestionStep skip_suggestion_steps = 1; + * @param \Google\Cloud\BigQuery\Migration\V2\SuggestionStep[] $var + * @return $this + */ + public function setSkipSuggestionSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\SuggestionStep::class); + $this->skip_suggestion_steps = $arr; + + return $this; + } + +} + diff --git a/BigQueryMigration/src/V2/SuggestionStep.php b/BigQueryMigration/src/V2/SuggestionStep.php new file mode 100644 index 000000000000..1e0883831ffd --- /dev/null +++ b/BigQueryMigration/src/V2/SuggestionStep.php @@ -0,0 +1,101 @@ +google.cloud.bigquery.migration.v2.SuggestionStep + */ +class SuggestionStep extends \Google\Protobuf\Internal\Message +{ + /** + * The type of suggestion. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType suggestion_type = 1; + */ + protected $suggestion_type = 0; + /** + * The rewrite target. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget rewrite_target = 2; + */ + protected $rewrite_target = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $suggestion_type + * The type of suggestion. + * @type int $rewrite_target + * The rewrite target. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce(); + parent::__construct($data); + } + + /** + * The type of suggestion. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType suggestion_type = 1; + * @return int + */ + public function getSuggestionType() + { + return $this->suggestion_type; + } + + /** + * The type of suggestion. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType suggestion_type = 1; + * @param int $var + * @return $this + */ + public function setSuggestionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\SuggestionStep\SuggestionType::class); + $this->suggestion_type = $var; + + return $this; + } + + /** + * The rewrite target. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget rewrite_target = 2; + * @return int + */ + public function getRewriteTarget() + { + return $this->rewrite_target; + } + + /** + * The rewrite target. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget rewrite_target = 2; + * @param int $var + * @return $this + */ + public function setRewriteTarget($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\SuggestionStep\RewriteTarget::class); + $this->rewrite_target = $var; + + return $this; + } + +} + diff --git a/BigQueryMigration/src/V2/SuggestionStep/RewriteTarget.php b/BigQueryMigration/src/V2/SuggestionStep/RewriteTarget.php new file mode 100644 index 000000000000..e14cf0108be8 --- /dev/null +++ b/BigQueryMigration/src/V2/SuggestionStep/RewriteTarget.php @@ -0,0 +1,61 @@ +google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget + */ +class RewriteTarget +{ + /** + * Rewrite target unspecified. + * + * Generated from protobuf enum REWRITE_TARGET_UNSPECIFIED = 0; + */ + const REWRITE_TARGET_UNSPECIFIED = 0; + /** + * Source SQL. + * + * Generated from protobuf enum SOURCE_SQL = 1; + */ + const SOURCE_SQL = 1; + /** + * Target SQL. + * + * Generated from protobuf enum TARGET_SQL = 2; + */ + const TARGET_SQL = 2; + + private static $valueToName = [ + self::REWRITE_TARGET_UNSPECIFIED => 'REWRITE_TARGET_UNSPECIFIED', + self::SOURCE_SQL => 'SOURCE_SQL', + self::TARGET_SQL => 'TARGET_SQL', + ]; + + 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/BigQueryMigration/src/V2/SuggestionStep/SuggestionType.php b/BigQueryMigration/src/V2/SuggestionStep/SuggestionType.php new file mode 100644 index 000000000000..171e9355aba1 --- /dev/null +++ b/BigQueryMigration/src/V2/SuggestionStep/SuggestionType.php @@ -0,0 +1,61 @@ +google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType + */ +class SuggestionType +{ + /** + * Suggestion type unspecified. + * + * Generated from protobuf enum SUGGESTION_TYPE_UNSPECIFIED = 0; + */ + const SUGGESTION_TYPE_UNSPECIFIED = 0; + /** + * Query customization. + * + * Generated from protobuf enum QUERY_CUSTOMIZATION = 1; + */ + const QUERY_CUSTOMIZATION = 1; + /** + * Translation explanation. + * + * Generated from protobuf enum TRANSLATION_EXPLANATION = 2; + */ + const TRANSLATION_EXPLANATION = 2; + + private static $valueToName = [ + self::SUGGESTION_TYPE_UNSPECIFIED => 'SUGGESTION_TYPE_UNSPECIFIED', + self::QUERY_CUSTOMIZATION => 'QUERY_CUSTOMIZATION', + self::TRANSLATION_EXPLANATION => 'TRANSLATION_EXPLANATION', + ]; + + 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/BigQueryMigration/src/V2/TranslationDetails.php b/BigQueryMigration/src/V2/TranslationDetails.php index ae4332d69204..adc0f676f7da 100644 --- a/BigQueryMigration/src/V2/TranslationDetails.php +++ b/BigQueryMigration/src/V2/TranslationDetails.php @@ -51,6 +51,12 @@ class TranslationDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string target_types = 5; */ private $target_types; + /** + * The configuration for the suggestion if requested as a target type. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionConfig suggestion_config = 6; + */ + protected $suggestion_config = null; /** * Constructor. @@ -73,6 +79,8 @@ class TranslationDetails extends \Google\Protobuf\Internal\Message * lineage_from_sql_scripts, etc. If not specified, a default set of * targets will be generated. Some additional target types may be slower to * generate. See the documentation for the set of available target types. + * @type \Google\Cloud\BigQuery\Migration\V2\SuggestionConfig $suggestion_config + * The configuration for the suggestion if requested as a target type. * } */ public function __construct($data = NULL) { @@ -230,5 +238,41 @@ public function setTargetTypes($var) return $this; } + /** + * The configuration for the suggestion if requested as a target type. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionConfig suggestion_config = 6; + * @return \Google\Cloud\BigQuery\Migration\V2\SuggestionConfig|null + */ + public function getSuggestionConfig() + { + return $this->suggestion_config; + } + + public function hasSuggestionConfig() + { + return isset($this->suggestion_config); + } + + public function clearSuggestionConfig() + { + unset($this->suggestion_config); + } + + /** + * The configuration for the suggestion if requested as a target type. + * + * Generated from protobuf field .google.cloud.bigquery.migration.v2.SuggestionConfig suggestion_config = 6; + * @param \Google\Cloud\BigQuery\Migration\V2\SuggestionConfig $var + * @return $this + */ + public function setSuggestionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SuggestionConfig::class); + $this->suggestion_config = $var; + + return $this; + } + } diff --git a/BigQueryMigration/src/V2/TranslationTaskResult.php b/BigQueryMigration/src/V2/TranslationTaskResult.php index 421b2b4905bd..765b346ef975 100644 --- a/BigQueryMigration/src/V2/TranslationTaskResult.php +++ b/BigQueryMigration/src/V2/TranslationTaskResult.php @@ -27,6 +27,12 @@ class TranslationTaskResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.bigquery.migration.v2.GcsReportLogMessage report_log_messages = 2; */ private $report_log_messages; + /** + * The Cloud Console URI for the migration workflow. + * + * Generated from protobuf field string console_uri = 3; + */ + protected $console_uri = ''; /** * Constructor. @@ -38,6 +44,8 @@ class TranslationTaskResult extends \Google\Protobuf\Internal\Message * The list of the translated literals. * @type \Google\Cloud\BigQuery\Migration\V2\GcsReportLogMessage[] $report_log_messages * The records from the aggregate CSV report for a migration workflow. + * @type string $console_uri + * The Cloud Console URI for the migration workflow. * } */ public function __construct($data = NULL) { @@ -97,5 +105,31 @@ public function setReportLogMessages($var) return $this; } + /** + * The Cloud Console URI for the migration workflow. + * + * Generated from protobuf field string console_uri = 3; + * @return string + */ + public function getConsoleUri() + { + return $this->console_uri; + } + + /** + * The Cloud Console URI for the migration workflow. + * + * Generated from protobuf field string console_uri = 3; + * @param string $var + * @return $this + */ + public function setConsoleUri($var) + { + GPBUtil::checkString($var, True); + $this->console_uri = $var; + + return $this; + } + }