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

namespace Google\Cloud\Notebooks\V1;

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

/**
 * Request for switching a Managed Notebook Runtime.
 *
 * Generated from protobuf message <code>google.cloud.notebooks.v1.SwitchRuntimeRequest</code>
 */
class SwitchRuntimeRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Format:
     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * machine type.
     *
     * Generated from protobuf field <code>string machine_type = 2;</code>
     */
    protected $machine_type = '';
    /**
     * accelerator config.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3;</code>
     */
    protected $accelerator_config = null;
    /**
     * Idempotent request UUID.
     *
     * Generated from protobuf field <code>string request_id = 4;</code>
     */
    protected $request_id = '';

    /**
     * @param string $name Required. Format:
     *                     `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
     *
     * @return \Google\Cloud\Notebooks\V1\SwitchRuntimeRequest
     *
     * @experimental
     */
    public static function build(string $name): self
    {
        return (new self())
            ->setName($name);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Format:
     *           `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
     *     @type string $machine_type
     *           machine type.
     *     @type \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $accelerator_config
     *           accelerator config.
     *     @type string $request_id
     *           Idempotent request UUID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Format:
     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Format:
     * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * machine type.
     *
     * Generated from protobuf field <code>string machine_type = 2;</code>
     * @return string
     */
    public function getMachineType()
    {
        return $this->machine_type;
    }

    /**
     * machine type.
     *
     * Generated from protobuf field <code>string machine_type = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setMachineType($var)
    {
        GPBUtil::checkString($var, True);
        $this->machine_type = $var;

        return $this;
    }

    /**
     * accelerator config.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3;</code>
     * @return \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig|null
     */
    public function getAcceleratorConfig()
    {
        return $this->accelerator_config;
    }

    public function hasAcceleratorConfig()
    {
        return isset($this->accelerator_config);
    }

    public function clearAcceleratorConfig()
    {
        unset($this->accelerator_config);
    }

    /**
     * accelerator config.
     *
     * Generated from protobuf field <code>.google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3;</code>
     * @param \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $var
     * @return $this
     */
    public function setAcceleratorConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig::class);
        $this->accelerator_config = $var;

        return $this;
    }

    /**
     * Idempotent request UUID.
     *
     * Generated from protobuf field <code>string request_id = 4;</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Idempotent request UUID.
     *
     * Generated from protobuf field <code>string request_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

}

