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

namespace Google\Cloud\Sql\V1beta4;

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

/**
 * Database instance operation errors list wrapper.
 *
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.OperationErrors</code>
 */
class OperationErrors extends \Google\Protobuf\Internal\Message
{
    /**
     * This is always `sql#operationErrors`.
     *
     * Generated from protobuf field <code>string kind = 1;</code>
     */
    private $kind = '';
    /**
     * The list of errors encountered while processing this operation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.sql.v1beta4.OperationError errors = 2;</code>
     */
    private $errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $kind
     *           This is always `sql#operationErrors`.
     *     @type array<\Google\Cloud\Sql\V1beta4\OperationError>|\Google\Protobuf\Internal\RepeatedField $errors
     *           The list of errors encountered while processing this operation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * This is always `sql#operationErrors`.
     *
     * Generated from protobuf field <code>string kind = 1;</code>
     * @return string
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * This is always `sql#operationErrors`.
     *
     * Generated from protobuf field <code>string kind = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkString($var, True);
        $this->kind = $var;

        return $this;
    }

    /**
     * The list of errors encountered while processing this operation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.sql.v1beta4.OperationError errors = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getErrors()
    {
        return $this->errors;
    }

    /**
     * The list of errors encountered while processing this operation.
     *
     * Generated from protobuf field <code>repeated .google.cloud.sql.v1beta4.OperationError errors = 2;</code>
     * @param array<\Google\Cloud\Sql\V1beta4\OperationError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Sql\V1beta4\OperationError::class);
        $this->errors = $arr;

        return $this;
    }

}

