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

namespace Google\Ads\GoogleAds\V21\Services;

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

/**
 * Result of the append conversation operation.
 *
 * Generated from protobuf message <code>google.ads.googleads.v21.services.ConversationOrError</code>
 */
class ConversationOrError extends \Google\Protobuf\Internal\Message
{
    protected $append_lead_conversation_response;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $local_services_lead_conversation
     *           The resource name of the appended local services lead conversation.
     *     @type \Google\Rpc\Status $partial_failure_error
     *           Failure status when the request could not be processed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V21\Services\LocalServicesLeadService::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the appended local services lead conversation.
     *
     * Generated from protobuf field <code>string local_services_lead_conversation = 1;</code>
     * @return string
     */
    public function getLocalServicesLeadConversation()
    {
        return $this->readOneof(1);
    }

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

    /**
     * The resource name of the appended local services lead conversation.
     *
     * Generated from protobuf field <code>string local_services_lead_conversation = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setLocalServicesLeadConversation($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Failure status when the request could not be processed.
     *
     * Generated from protobuf field <code>.google.rpc.Status partial_failure_error = 2;</code>
     * @return \Google\Rpc\Status|null
     */
    public function getPartialFailureError()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Failure status when the request could not be processed.
     *
     * Generated from protobuf field <code>.google.rpc.Status partial_failure_error = 2;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setPartialFailureError($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

