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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Configuration for the runtime on a PersistentResource instance, including
 * but not limited to:
 * * Service accounts used to run the workloads.
 * * Whether to make it a dedicated Ray Cluster.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.ResourceRuntimeSpec</code>
 */
class ResourceRuntimeSpec extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Configure the use of workload identity on the PersistentResource
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $service_account_spec = null;
    /**
     * Optional. Ray cluster configuration.
     * Required when creating a dedicated RayCluster on the PersistentResource.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $ray_spec = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\ServiceAccountSpec $service_account_spec
     *           Optional. Configure the use of workload identity on the PersistentResource
     *     @type \Google\Cloud\AIPlatform\V1\RaySpec $ray_spec
     *           Optional. Ray cluster configuration.
     *           Required when creating a dedicated RayCluster on the PersistentResource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Configure the use of workload identity on the PersistentResource
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\ServiceAccountSpec|null
     */
    public function getServiceAccountSpec()
    {
        return $this->service_account_spec;
    }

    public function hasServiceAccountSpec()
    {
        return isset($this->service_account_spec);
    }

    public function clearServiceAccountSpec()
    {
        unset($this->service_account_spec);
    }

    /**
     * Optional. Configure the use of workload identity on the PersistentResource
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\ServiceAccountSpec $var
     * @return $this
     */
    public function setServiceAccountSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ServiceAccountSpec::class);
        $this->service_account_spec = $var;

        return $this;
    }

    /**
     * Optional. Ray cluster configuration.
     * Required when creating a dedicated RayCluster on the PersistentResource.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\AIPlatform\V1\RaySpec|null
     */
    public function getRaySpec()
    {
        return $this->ray_spec;
    }

    public function hasRaySpec()
    {
        return isset($this->ray_spec);
    }

    public function clearRaySpec()
    {
        unset($this->ray_spec);
    }

    /**
     * Optional. Ray cluster configuration.
     * Required when creating a dedicated RayCluster on the PersistentResource.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\AIPlatform\V1\RaySpec $var
     * @return $this
     */
    public function setRaySpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RaySpec::class);
        $this->ray_spec = $var;

        return $this;
    }

}

