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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [GenAiTuningService.RebaseTunedModel][google.cloud.aiplatform.v1.GenAiTuningService.RebaseTunedModel].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.RebaseTunedModelRequest</code>
 */
class RebaseTunedModelRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the Location into which to rebase the Model.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. TunedModel reference to retrieve the legacy model information.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.TunedModelRef tuned_model_ref = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tuned_model_ref = null;
    /**
     * Optional. The TuningJob to be updated. Users can use this TuningJob field
     * to overwrite tuning configs.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.TuningJob tuning_job = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $tuning_job = null;
    /**
     * Optional. The Google Cloud Storage location to write the artifacts.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GcsDestination artifact_destination = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $artifact_destination = null;
    /**
     * Optional. By default, bison to gemini migration will always create new
     * model/endpoint, but for gemini-1.0 to gemini-1.5 migration, we default
     * deploy to the same endpoint. See details in this Section.
     *
     * Generated from protobuf field <code>bool deploy_to_same_endpoint = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $deploy_to_same_endpoint = false;

    /**
     * @param string                                    $parent        Required. The resource name of the Location into which to rebase the Model.
     *                                                                 Format: `projects/{project}/locations/{location}`
     *                                                                 Please see {@see GenAiTuningServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\TunedModelRef $tunedModelRef Required. TunedModel reference to retrieve the legacy model information.
     *
     * @return \Google\Cloud\AIPlatform\V1\RebaseTunedModelRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\AIPlatform\V1\TunedModelRef $tunedModelRef): self
    {
        return (new self())
            ->setParent($parent)
            ->setTunedModelRef($tunedModelRef);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the Location into which to rebase the Model.
     *           Format: `projects/{project}/locations/{location}`
     *     @type \Google\Cloud\AIPlatform\V1\TunedModelRef $tuned_model_ref
     *           Required. TunedModel reference to retrieve the legacy model information.
     *     @type \Google\Cloud\AIPlatform\V1\TuningJob $tuning_job
     *           Optional. The TuningJob to be updated. Users can use this TuningJob field
     *           to overwrite tuning configs.
     *     @type \Google\Cloud\AIPlatform\V1\GcsDestination $artifact_destination
     *           Optional. The Google Cloud Storage location to write the artifacts.
     *     @type bool $deploy_to_same_endpoint
     *           Optional. By default, bison to gemini migration will always create new
     *           model/endpoint, but for gemini-1.0 to gemini-1.5 migration, we default
     *           deploy to the same endpoint. See details in this Section.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\GenaiTuningService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the Location into which to rebase the Model.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The resource name of the Location into which to rebase the Model.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. TunedModel reference to retrieve the legacy model information.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.TunedModelRef tuned_model_ref = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\TunedModelRef|null
     */
    public function getTunedModelRef()
    {
        return $this->tuned_model_ref;
    }

    public function hasTunedModelRef()
    {
        return isset($this->tuned_model_ref);
    }

    public function clearTunedModelRef()
    {
        unset($this->tuned_model_ref);
    }

    /**
     * Required. TunedModel reference to retrieve the legacy model information.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.TunedModelRef tuned_model_ref = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\TunedModelRef $var
     * @return $this
     */
    public function setTunedModelRef($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\TunedModelRef::class);
        $this->tuned_model_ref = $var;

        return $this;
    }

    /**
     * Optional. The TuningJob to be updated. Users can use this TuningJob field
     * to overwrite tuning configs.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.TuningJob tuning_job = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\TuningJob|null
     */
    public function getTuningJob()
    {
        return $this->tuning_job;
    }

    public function hasTuningJob()
    {
        return isset($this->tuning_job);
    }

    public function clearTuningJob()
    {
        unset($this->tuning_job);
    }

    /**
     * Optional. The TuningJob to be updated. Users can use this TuningJob field
     * to overwrite tuning configs.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.TuningJob tuning_job = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\TuningJob $var
     * @return $this
     */
    public function setTuningJob($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\TuningJob::class);
        $this->tuning_job = $var;

        return $this;
    }

    /**
     * Optional. The Google Cloud Storage location to write the artifacts.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GcsDestination artifact_destination = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\GcsDestination|null
     */
    public function getArtifactDestination()
    {
        return $this->artifact_destination;
    }

    public function hasArtifactDestination()
    {
        return isset($this->artifact_destination);
    }

    public function clearArtifactDestination()
    {
        unset($this->artifact_destination);
    }

    /**
     * Optional. The Google Cloud Storage location to write the artifacts.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.GcsDestination artifact_destination = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\GcsDestination $var
     * @return $this
     */
    public function setArtifactDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GcsDestination::class);
        $this->artifact_destination = $var;

        return $this;
    }

    /**
     * Optional. By default, bison to gemini migration will always create new
     * model/endpoint, but for gemini-1.0 to gemini-1.5 migration, we default
     * deploy to the same endpoint. See details in this Section.
     *
     * Generated from protobuf field <code>bool deploy_to_same_endpoint = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getDeployToSameEndpoint()
    {
        return $this->deploy_to_same_endpoint;
    }

    /**
     * Optional. By default, bison to gemini migration will always create new
     * model/endpoint, but for gemini-1.0 to gemini-1.5 migration, we default
     * deploy to the same endpoint. See details in this Section.
     *
     * Generated from protobuf field <code>bool deploy_to_same_endpoint = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setDeployToSameEndpoint($var)
    {
        GPBUtil::checkBool($var);
        $this->deploy_to_same_endpoint = $var;

        return $this;
    }

}

