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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Response message for
 * [ConversionUploadService.UploadCallConversions][google.ads.googleads.v23.services.ConversionUploadService.UploadCallConversions].
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.UploadCallConversionsResponse</code>
 */
class UploadCallConversionsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Errors that pertain to conversion failures in the partial failure mode.
     * Returned when all errors occur inside the conversions. If any errors occur
     * outside the conversions (for example, auth errors), we return an RPC level
     * error.
     * See
     * [Best practices for partial
     * failures](/google-ads/api/docs/best-practices/partial-failures).
     *
     * Generated from protobuf field <code>.google.rpc.Status partial_failure_error = 1;</code>
     */
    protected $partial_failure_error = null;
    /**
     * Returned for successfully processed conversions. Proto will be empty for
     * rows that received an error. Results are not returned when `validate_only`
     * is `true`.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.CallConversionResult results = 2;</code>
     */
    private $results;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type \Google\Rpc\Status $partial_failure_error
     *           Errors that pertain to conversion failures in the partial failure mode.
     *           Returned when all errors occur inside the conversions. If any errors occur
     *           outside the conversions (for example, auth errors), we return an RPC level
     *           error.
     *           See
     *           [Best practices for partial
     *           failures](/google-ads/api/docs/best-practices/partial-failures).
     * @type \Google\Ads\GoogleAds\V23\Services\CallConversionResult[] $results
     *           Returned for successfully processed conversions. Proto will be empty for
     *           rows that received an error. Results are not returned when `validate_only`
     *           is `true`.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\ConversionUploadService::initOnce();
        parent::__construct($data);
    }

    /**
     * Errors that pertain to conversion failures in the partial failure mode.
     * Returned when all errors occur inside the conversions. If any errors occur
     * outside the conversions (for example, auth errors), we return an RPC level
     * error.
     * See
     * [Best practices for partial
     * failures](/google-ads/api/docs/best-practices/partial-failures).
     *
     * Generated from protobuf field <code>.google.rpc.Status partial_failure_error = 1;</code>
     *
     * @return \Google\Rpc\Status|null
     */
    public function getPartialFailureError()
    {
        return $this->partial_failure_error;
    }

    public function hasPartialFailureError()
    {
        return isset($this->partial_failure_error);
    }

    public function clearPartialFailureError()
    {
        unset($this->partial_failure_error);
    }

    /**
     * Errors that pertain to conversion failures in the partial failure mode.
     * Returned when all errors occur inside the conversions. If any errors occur
     * outside the conversions (for example, auth errors), we return an RPC level
     * error.
     * See
     * [Best practices for partial
     * failures](/google-ads/api/docs/best-practices/partial-failures).
     *
     * Generated from protobuf field <code>.google.rpc.Status partial_failure_error = 1;</code>
     *
     * @param  \Google\Rpc\Status $var
     * @return $this
     */
    public function setPartialFailureError($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->partial_failure_error = $var;

        return $this;
    }

    /**
     * Returned for successfully processed conversions. Proto will be empty for
     * rows that received an error. Results are not returned when `validate_only`
     * is `true`.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.CallConversionResult results = 2;</code>
     *
     * @return RepeatedField<\Google\Ads\GoogleAds\V23\Services\CallConversionResult>
     */
    public function getResults()
    {
        return $this->results;
    }

    /**
     * Returned for successfully processed conversions. Proto will be empty for
     * rows that received an error. Results are not returned when `validate_only`
     * is `true`.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v23.services.CallConversionResult results = 2;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\CallConversionResult[] $var
     * @return $this
     */
    public function setResults($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V23\Services\CallConversionResult::class);
        $this->results = $arr;

        return $this;
    }

}

