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

namespace Google\Cloud\Dataplex\V1\Task;

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

/**
 * Configuration for the underlying infrastructure used to run workloads.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.Task.InfrastructureSpec</code>
 */
class InfrastructureSpec extends \Google\Protobuf\Internal\Message
{
    protected $resources;
    protected $runtime;
    protected $network;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $batch
     *           Compute resources needed for a Task when using Dataproc Serverless.
     *     @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $container_image
     *           Container Image Runtime Configuration.
     *     @type \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $vpc_network
     *           Vpc network.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Tasks::initOnce();
        parent::__construct($data);
    }

    /**
     * Compute resources needed for a Task when using Dataproc Serverless.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52;</code>
     * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources|null
     */
    public function getBatch()
    {
        return $this->readOneof(52);
    }

    public function hasBatch()
    {
        return $this->hasOneof(52);
    }

    /**
     * Compute resources needed for a Task when using Dataproc Serverless.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Task.InfrastructureSpec.BatchComputeResources batch = 52;</code>
     * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources $var
     * @return $this
     */
    public function setBatch($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\BatchComputeResources::class);
        $this->writeOneof(52, $var);

        return $this;
    }

    /**
     * Container Image Runtime Configuration.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101;</code>
     * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime|null
     */
    public function getContainerImage()
    {
        return $this->readOneof(101);
    }

    public function hasContainerImage()
    {
        return $this->hasOneof(101);
    }

    /**
     * Container Image Runtime Configuration.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Task.InfrastructureSpec.ContainerImageRuntime container_image = 101;</code>
     * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime $var
     * @return $this
     */
    public function setContainerImage($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\ContainerImageRuntime::class);
        $this->writeOneof(101, $var);

        return $this;
    }

    /**
     * Vpc network.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150;</code>
     * @return \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork|null
     */
    public function getVpcNetwork()
    {
        return $this->readOneof(150);
    }

    public function hasVpcNetwork()
    {
        return $this->hasOneof(150);
    }

    /**
     * Vpc network.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Task.InfrastructureSpec.VpcNetwork vpc_network = 150;</code>
     * @param \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork $var
     * @return $this
     */
    public function setVpcNetwork($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\Task\InfrastructureSpec\VpcNetwork::class);
        $this->writeOneof(150, $var);

        return $this;
    }

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

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

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

}


