<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/migration_service.proto

namespace Google\Cloud\AIPlatform\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Config of migrating one resource from automl.googleapis.com,
 * datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.MigrateResourceRequest</code>
 */
class MigrateResourceRequest extends \Google\Protobuf\Internal\Message
{
    protected $request;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateMlEngineModelVersionConfig $migrate_ml_engine_model_version_config
     *           Config for migrating Version in ml.googleapis.com to Vertex AI's Model.
     *     @type \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlModelConfig $migrate_automl_model_config
     *           Config for migrating Model in automl.googleapis.com to Vertex AI's
     *           Model.
     *     @type \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlDatasetConfig $migrate_automl_dataset_config
     *           Config for migrating Dataset in automl.googleapis.com to Vertex AI's
     *           Dataset.
     *     @type \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateDataLabelingDatasetConfig $migrate_data_labeling_dataset_config
     *           Config for migrating Dataset in datalabeling.googleapis.com to
     *           Vertex AI's Dataset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MigrationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Config for migrating Version in ml.googleapis.com to Vertex AI's Model.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1;</code>
     * @return \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateMlEngineModelVersionConfig|null
     */
    public function getMigrateMlEngineModelVersionConfig()
    {
        return $this->readOneof(1);
    }

    public function hasMigrateMlEngineModelVersionConfig()
    {
        return $this->hasOneof(1);
    }

    /**
     * Config for migrating Version in ml.googleapis.com to Vertex AI's Model.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateMlEngineModelVersionConfig migrate_ml_engine_model_version_config = 1;</code>
     * @param \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateMlEngineModelVersionConfig $var
     * @return $this
     */
    public function setMigrateMlEngineModelVersionConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateMlEngineModelVersionConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Config for migrating Model in automl.googleapis.com to Vertex AI's
     * Model.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlModelConfig|null
     */
    public function getMigrateAutomlModelConfig()
    {
        return $this->readOneof(2);
    }

    public function hasMigrateAutomlModelConfig()
    {
        return $this->hasOneof(2);
    }

    /**
     * Config for migrating Model in automl.googleapis.com to Vertex AI's
     * Model.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlModelConfig migrate_automl_model_config = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlModelConfig $var
     * @return $this
     */
    public function setMigrateAutomlModelConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlModelConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Config for migrating Dataset in automl.googleapis.com to Vertex AI's
     * Dataset.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3;</code>
     * @return \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlDatasetConfig|null
     */
    public function getMigrateAutomlDatasetConfig()
    {
        return $this->readOneof(3);
    }

    public function hasMigrateAutomlDatasetConfig()
    {
        return $this->hasOneof(3);
    }

    /**
     * Config for migrating Dataset in automl.googleapis.com to Vertex AI's
     * Dataset.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateAutomlDatasetConfig migrate_automl_dataset_config = 3;</code>
     * @param \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlDatasetConfig $var
     * @return $this
     */
    public function setMigrateAutomlDatasetConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateAutomlDatasetConfig::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Config for migrating Dataset in datalabeling.googleapis.com to
     * Vertex AI's Dataset.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4;</code>
     * @return \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateDataLabelingDatasetConfig|null
     */
    public function getMigrateDataLabelingDatasetConfig()
    {
        return $this->readOneof(4);
    }

    public function hasMigrateDataLabelingDatasetConfig()
    {
        return $this->hasOneof(4);
    }

    /**
     * Config for migrating Dataset in datalabeling.googleapis.com to
     * Vertex AI's Dataset.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MigrateResourceRequest.MigrateDataLabelingDatasetConfig migrate_data_labeling_dataset_config = 4;</code>
     * @param \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateDataLabelingDatasetConfig $var
     * @return $this
     */
    public function setMigrateDataLabelingDatasetConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MigrateResourceRequest\MigrateDataLabelingDatasetConfig::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getRequest()
    {
        return $this->whichOneof("request");
    }

}

