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

namespace Google\Cloud\Datastream\V1;

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

/**
 * Contains the current validation results.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.ValidationResult</code>
 */
class ValidationResult extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of validations (includes both executed as well as not executed
     * validations).
     *
     * Generated from protobuf field <code>repeated .google.cloud.datastream.v1.Validation validations = 1;</code>
     */
    private $validations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Datastream\V1\Validation>|\Google\Protobuf\Internal\RepeatedField $validations
     *           A list of validations (includes both executed as well as not executed
     *           validations).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of validations (includes both executed as well as not executed
     * validations).
     *
     * Generated from protobuf field <code>repeated .google.cloud.datastream.v1.Validation validations = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getValidations()
    {
        return $this->validations;
    }

    /**
     * A list of validations (includes both executed as well as not executed
     * validations).
     *
     * Generated from protobuf field <code>repeated .google.cloud.datastream.v1.Validation validations = 1;</code>
     * @param array<\Google\Cloud\Datastream\V1\Validation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setValidations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\Validation::class);
        $this->validations = $arr;

        return $this;
    }

}

