<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v23/resources/offline_conversion_upload_client_summary.proto

namespace Google\Ads\GoogleAds\V23\Resources;

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

/**
 * Historical upload summary, grouped by upload date or job.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.resources.OfflineConversionSummary</code>
 */
class OfflineConversionSummary extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Total count of successful event.
     *
     * Generated from protobuf field <code>int64 successful_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $successful_count = 0;
    /**
     * Output only. Total count of failed event.
     *
     * Generated from protobuf field <code>int64 failed_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $failed_count = 0;
    /**
     * Output only. Total count of pending uploaded event.
     *
     * Generated from protobuf field <code>int64 pending_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $pending_count = 0;
    protected $dimension_key;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $successful_count
     *           Output only. Total count of successful event.
     *     @type int|string $failed_count
     *           Output only. Total count of failed event.
     *     @type int|string $pending_count
     *           Output only. Total count of pending uploaded event.
     *     @type int|string $job_id
     *           Output only. Dimension key for last N jobs.
     *     @type string $upload_date
     *           Output only. Dimension key for last N days.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Resources\OfflineConversionUploadClientSummary::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Total count of successful event.
     *
     * Generated from protobuf field <code>int64 successful_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getSuccessfulCount()
    {
        return $this->successful_count;
    }

    /**
     * Output only. Total count of successful event.
     *
     * Generated from protobuf field <code>int64 successful_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setSuccessfulCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->successful_count = $var;

        return $this;
    }

    /**
     * Output only. Total count of failed event.
     *
     * Generated from protobuf field <code>int64 failed_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getFailedCount()
    {
        return $this->failed_count;
    }

    /**
     * Output only. Total count of failed event.
     *
     * Generated from protobuf field <code>int64 failed_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setFailedCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->failed_count = $var;

        return $this;
    }

    /**
     * Output only. Total count of pending uploaded event.
     *
     * Generated from protobuf field <code>int64 pending_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getPendingCount()
    {
        return $this->pending_count;
    }

    /**
     * Output only. Total count of pending uploaded event.
     *
     * Generated from protobuf field <code>int64 pending_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setPendingCount($var)
    {
        GPBUtil::checkInt64($var);
        $this->pending_count = $var;

        return $this;
    }

    /**
     * Output only. Dimension key for last N jobs.
     *
     * Generated from protobuf field <code>int64 job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getJobId()
    {
        return $this->readOneof(1);
    }

    public function hasJobId()
    {
        return $this->hasOneof(1);
    }

    /**
     * Output only. Dimension key for last N jobs.
     *
     * Generated from protobuf field <code>int64 job_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setJobId($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Output only. Dimension key for last N days.
     *
     * Generated from protobuf field <code>string upload_date = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUploadDate()
    {
        return $this->readOneof(2);
    }

    public function hasUploadDate()
    {
        return $this->hasOneof(2);
    }

    /**
     * Output only. Dimension key for last N days.
     *
     * Generated from protobuf field <code>string upload_date = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUploadDate($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getDimensionKey()
    {
        return $this->whichOneof("dimension_key");
    }

}

