<?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;

/**
 * Metadata related to the progress of the Import operation. This will be
 * returned by the google.longrunning.Operation.metadata field.
 *
 * Generated from protobuf message <code>google.cloud.recommendationengine.v1beta1.ImportMetadata</code>
 */
class ImportMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Name of the operation.
     *
     * Generated from protobuf field <code>string operation_name = 5;</code>
     */
    private $operation_name = '';
    /**
     * Id of the request / operation. This is parroting back the requestId that
     * was passed in the request.
     *
     * Generated from protobuf field <code>string request_id = 3;</code>
     */
    private $request_id = '';
    /**
     * Operation create time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    private $create_time = null;
    /**
     * Count of entries that were processed successfully.
     *
     * Generated from protobuf field <code>int64 success_count = 1;</code>
     */
    private $success_count = 0;
    /**
     * Count of entries that encountered errors while processing.
     *
     * Generated from protobuf field <code>int64 failure_count = 2;</code>
     */
    private $failure_count = 0;
    /**
     * Operation last update time. If the operation is done, this is also the
     * finish time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6;</code>
     */
    private $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $operation_name
     *           Name of the operation.
     *     @type string $request_id
     *           Id of the request / operation. This is parroting back the requestId that
     *           was passed in the request.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Operation create time.
     *     @type int|string $success_count
     *           Count of entries that were processed successfully.
     *     @type int|string $failure_count
     *           Count of entries that encountered errors while processing.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Operation last update time. If the operation is done, this is also the
     *           finish time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recommendationengine\V1Beta1\Import::initOnce();
        parent::__construct($data);
    }

    /**
     * Name of the operation.
     *
     * Generated from protobuf field <code>string operation_name = 5;</code>
     * @return string
     */
    public function getOperationName()
    {
        return $this->operation_name;
    }

    /**
     * Name of the operation.
     *
     * Generated from protobuf field <code>string operation_name = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setOperationName($var)
    {
        GPBUtil::checkString($var, True);
        $this->operation_name = $var;

        return $this;
    }

    /**
     * Id of the request / operation. This is parroting back the requestId that
     * was passed in the request.
     *
     * Generated from protobuf field <code>string request_id = 3;</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Id of the request / operation. This is parroting back the requestId that
     * was passed in the request.
     *
     * Generated from protobuf field <code>string request_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Operation create time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    /**
     * Operation create time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 4;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Count of entries that were processed successfully.
     *
     * Generated from protobuf field <code>int64 success_count = 1;</code>
     * @return int|string
     */
    public function getSuccessCount()
    {
        return $this->success_count;
    }

    /**
     * Count of entries that were processed successfully.
     *
     * Generated from protobuf field <code>int64 success_count = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setSuccessCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->success_count = $var;

        return $this;
    }

    /**
     * Count of entries that encountered errors while processing.
     *
     * Generated from protobuf field <code>int64 failure_count = 2;</code>
     * @return int|string
     */
    public function getFailureCount()
    {
        return $this->failure_count;
    }

    /**
     * Count of entries that encountered errors while processing.
     *
     * Generated from protobuf field <code>int64 failure_count = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setFailureCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->failure_count = $var;

        return $this;
    }

    /**
     * Operation last update time. If the operation is done, this is also the
     * finish time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    /**
     * Operation last update time. If the operation is done, this is also the
     * finish time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

