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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * A description of resources that are used for performing batch operations, are
 * dedicated to a Model, and need manual configuration.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.BatchDedicatedResources</code>
 */
class BatchDedicatedResources extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Immutable. The specification of a single machine.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $machine_spec = null;
    /**
     * Immutable. The number of machine replicas used at the start of the batch
     * operation. If not set, Vertex AI decides starting number, not greater than
     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
     *
     * Generated from protobuf field <code>int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $starting_replica_count = 0;
    /**
     * Immutable. The maximum number of machine replicas the batch operation may
     * be scaled to. The default value is 10.
     *
     * Generated from protobuf field <code>int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $max_replica_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AIPlatform\V1\MachineSpec $machine_spec
     *           Required. Immutable. The specification of a single machine.
     *     @type int $starting_replica_count
     *           Immutable. The number of machine replicas used at the start of the batch
     *           operation. If not set, Vertex AI decides starting number, not greater than
     *           [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
     *     @type int $max_replica_count
     *           Immutable. The maximum number of machine replicas the batch operation may
     *           be scaled to. The default value is 10.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MachineResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Immutable. The specification of a single machine.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Cloud\AIPlatform\V1\MachineSpec|null
     */
    public function getMachineSpec()
    {
        return $this->machine_spec;
    }

    public function hasMachineSpec()
    {
        return isset($this->machine_spec);
    }

    public function clearMachineSpec()
    {
        unset($this->machine_spec);
    }

    /**
     * Required. Immutable. The specification of a single machine.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];</code>
     * @param \Google\Cloud\AIPlatform\V1\MachineSpec $var
     * @return $this
     */
    public function setMachineSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MachineSpec::class);
        $this->machine_spec = $var;

        return $this;
    }

    /**
     * Immutable. The number of machine replicas used at the start of the batch
     * operation. If not set, Vertex AI decides starting number, not greater than
     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
     *
     * Generated from protobuf field <code>int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getStartingReplicaCount()
    {
        return $this->starting_replica_count;
    }

    /**
     * Immutable. The number of machine replicas used at the start of the batch
     * operation. If not set, Vertex AI decides starting number, not greater than
     * [max_replica_count][google.cloud.aiplatform.v1.BatchDedicatedResources.max_replica_count]
     *
     * Generated from protobuf field <code>int32 starting_replica_count = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setStartingReplicaCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->starting_replica_count = $var;

        return $this;
    }

    /**
     * Immutable. The maximum number of machine replicas the batch operation may
     * be scaled to. The default value is 10.
     *
     * Generated from protobuf field <code>int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getMaxReplicaCount()
    {
        return $this->max_replica_count;
    }

    /**
     * Immutable. The maximum number of machine replicas the batch operation may
     * be scaled to. The default value is 10.
     *
     * Generated from protobuf field <code>int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setMaxReplicaCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_replica_count = $var;

        return $this;
    }

}

