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

namespace Google\Cloud\MigrationCenter\V1;

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

/**
 * A resource that aggregates the validation errors found in an import job file.
 *
 * Generated from protobuf message <code>google.cloud.migrationcenter.v1.FileValidationReport</code>
 */
class FileValidationReport extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the file.
     *
     * Generated from protobuf field <code>string file_name = 1;</code>
     */
    protected $file_name = '';
    /**
     * Partial list of rows that encountered validation error.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2;</code>
     */
    private $row_errors;
    /**
     * Flag indicating that processing was aborted due to maximum number of
     * errors.
     *
     * Generated from protobuf field <code>bool partial_report = 3;</code>
     */
    protected $partial_report = false;
    /**
     * List of file level errors.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4;</code>
     */
    private $file_errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $file_name
     *           The name of the file.
     *     @type array<\Google\Cloud\MigrationCenter\V1\ImportRowError>|\Google\Protobuf\Internal\RepeatedField $row_errors
     *           Partial list of rows that encountered validation error.
     *     @type bool $partial_report
     *           Flag indicating that processing was aborted due to maximum number of
     *           errors.
     *     @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $file_errors
     *           List of file level errors.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the file.
     *
     * Generated from protobuf field <code>string file_name = 1;</code>
     * @return string
     */
    public function getFileName()
    {
        return $this->file_name;
    }

    /**
     * The name of the file.
     *
     * Generated from protobuf field <code>string file_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFileName($var)
    {
        GPBUtil::checkString($var, True);
        $this->file_name = $var;

        return $this;
    }

    /**
     * Partial list of rows that encountered validation error.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRowErrors()
    {
        return $this->row_errors;
    }

    /**
     * Partial list of rows that encountered validation error.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2;</code>
     * @param array<\Google\Cloud\MigrationCenter\V1\ImportRowError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRowErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportRowError::class);
        $this->row_errors = $arr;

        return $this;
    }

    /**
     * Flag indicating that processing was aborted due to maximum number of
     * errors.
     *
     * Generated from protobuf field <code>bool partial_report = 3;</code>
     * @return bool
     */
    public function getPartialReport()
    {
        return $this->partial_report;
    }

    /**
     * Flag indicating that processing was aborted due to maximum number of
     * errors.
     *
     * Generated from protobuf field <code>bool partial_report = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setPartialReport($var)
    {
        GPBUtil::checkBool($var);
        $this->partial_report = $var;

        return $this;
    }

    /**
     * List of file level errors.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFileErrors()
    {
        return $this->file_errors;
    }

    /**
     * List of file level errors.
     *
     * Generated from protobuf field <code>repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4;</code>
     * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFileErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class);
        $this->file_errors = $arr;

        return $this;
    }

}

