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

namespace Google\Cloud\RecommendationEngine\V1beta1;

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

/**
 * Response of the ImportUserEventsRequest. If the long running
 * operation was successful, then this message is returned by the
 * google.longrunning.Operations.response field if the operation was successful.
 *
 * Generated from protobuf message <code>google.cloud.recommendationengine.v1beta1.ImportUserEventsResponse</code>
 */
class ImportUserEventsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * A sample of errors encountered while processing the request.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status error_samples = 1;</code>
     */
    private $error_samples;
    /**
     * Echoes the destination for the complete errors if this field was set in
     * the request.
     *
     * Generated from protobuf field <code>.google.cloud.recommendationengine.v1beta1.ImportErrorsConfig errors_config = 2;</code>
     */
    private $errors_config = null;
    /**
     * Aggregated statistics of user event import status.
     *
     * Generated from protobuf field <code>.google.cloud.recommendationengine.v1beta1.UserEventImportSummary import_summary = 3;</code>
     */
    private $import_summary = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $error_samples
     *           A sample of errors encountered while processing the request.
     *     @type \Google\Cloud\RecommendationEngine\V1beta1\ImportErrorsConfig $errors_config
     *           Echoes the destination for the complete errors if this field was set in
     *           the request.
     *     @type \Google\Cloud\RecommendationEngine\V1beta1\UserEventImportSummary $import_summary
     *           Aggregated statistics of user event import status.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recommendationengine\V1Beta1\Import::initOnce();
        parent::__construct($data);
    }

    /**
     * A sample of errors encountered while processing the request.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status error_samples = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getErrorSamples()
    {
        return $this->error_samples;
    }

    /**
     * A sample of errors encountered while processing the request.
     *
     * Generated from protobuf field <code>repeated .google.rpc.Status error_samples = 1;</code>
     * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setErrorSamples($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class);
        $this->error_samples = $arr;

        return $this;
    }

    /**
     * Echoes the destination for the complete errors if this field was set in
     * the request.
     *
     * Generated from protobuf field <code>.google.cloud.recommendationengine.v1beta1.ImportErrorsConfig errors_config = 2;</code>
     * @return \Google\Cloud\RecommendationEngine\V1beta1\ImportErrorsConfig|null
     */
    public function getErrorsConfig()
    {
        return $this->errors_config;
    }

    public function hasErrorsConfig()
    {
        return isset($this->errors_config);
    }

    public function clearErrorsConfig()
    {
        unset($this->errors_config);
    }

    /**
     * Echoes the destination for the complete errors if this field was set in
     * the request.
     *
     * Generated from protobuf field <code>.google.cloud.recommendationengine.v1beta1.ImportErrorsConfig errors_config = 2;</code>
     * @param \Google\Cloud\RecommendationEngine\V1beta1\ImportErrorsConfig $var
     * @return $this
     */
    public function setErrorsConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\RecommendationEngine\V1beta1\ImportErrorsConfig::class);
        $this->errors_config = $var;

        return $this;
    }

    /**
     * Aggregated statistics of user event import status.
     *
     * Generated from protobuf field <code>.google.cloud.recommendationengine.v1beta1.UserEventImportSummary import_summary = 3;</code>
     * @return \Google\Cloud\RecommendationEngine\V1beta1\UserEventImportSummary|null
     */
    public function getImportSummary()
    {
        return $this->import_summary;
    }

    public function hasImportSummary()
    {
        return isset($this->import_summary);
    }

    public function clearImportSummary()
    {
        unset($this->import_summary);
    }

    /**
     * Aggregated statistics of user event import status.
     *
     * Generated from protobuf field <code>.google.cloud.recommendationengine.v1beta1.UserEventImportSummary import_summary = 3;</code>
     * @param \Google\Cloud\RecommendationEngine\V1beta1\UserEventImportSummary $var
     * @return $this
     */
    public function setImportSummary($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\RecommendationEngine\V1beta1\UserEventImportSummary::class);
        $this->import_summary = $var;

        return $this;
    }

}

