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

namespace Google\Cloud\Compute\V1;

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

/**
 * A specification of the parameters to use when creating the instance template from a source instance.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.SourceInstanceParams</code>
 */
class SourceInstanceParams extends \Google\Protobuf\Internal\Message
{
    /**
     * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;</code>
     */
    private $disk_configs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Compute\V1\DiskInstantiationConfig>|\Google\Protobuf\Internal\RepeatedField $disk_configs
     *           Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDiskConfigs()
    {
        return $this->disk_configs;
    }

    /**
     * Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.DiskInstantiationConfig disk_configs = 235580623;</code>
     * @param array<\Google\Cloud\Compute\V1\DiskInstantiationConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDiskConfigs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\DiskInstantiationConfig::class);
        $this->disk_configs = $arr;

        return $this;
    }

}

