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

namespace Google\Ads\GoogleAds\V23\Services;

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

/**
 * Request message for
 * [LocalServicesLeadService.ProvideLeadFeedback][google.ads.googleads.v23.services.LocalServicesLeadService.ProvideLeadFeedback].
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.services.ProvideLeadFeedbackRequest</code>
 */
class ProvideLeadFeedbackRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the local services lead that for which the
     * feedback is being provided.
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Required. Survey answer for Local Services Ads Lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.LocalServicesLeadSurveyAnswerEnum.SurveyAnswer survey_answer = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $survey_answer = 0;
    protected $survey_details;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $resource_name
     *           Required. The resource name of the local services lead that for which the
     *           feedback is being provided.
     * @type int $survey_answer
     *           Required. Survey answer for Local Services Ads Lead.
     * @type \Google\Ads\GoogleAds\V23\Services\SurveySatisfied $survey_satisfied
     *           Details about various factors for being satisfied with the lead.
     * @type \Google\Ads\GoogleAds\V23\Services\SurveyDissatisfied $survey_dissatisfied
     *           Details about various factors for not being satisfied with the lead.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Services\LocalServicesLeadService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the local services lead that for which the
     * feedback is being provided.
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     *
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Required. The resource name of the local services lead that for which the
     * feedback is being provided.
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, true);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Required. Survey answer for Local Services Ads Lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.LocalServicesLeadSurveyAnswerEnum.SurveyAnswer survey_answer = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return int
     */
    public function getSurveyAnswer()
    {
        return $this->survey_answer;
    }

    /**
     * Required. Survey answer for Local Services Ads Lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.LocalServicesLeadSurveyAnswerEnum.SurveyAnswer survey_answer = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param  int $var
     * @return $this
     */
    public function setSurveyAnswer($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\LocalServicesLeadSurveyAnswerEnum\SurveyAnswer::class);
        $this->survey_answer = $var;

        return $this;
    }

    /**
     * Details about various factors for being satisfied with the lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurveySatisfied survey_satisfied = 3;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Services\SurveySatisfied|null
     */
    public function getSurveySatisfied()
    {
        return $this->readOneof(3);
    }

    public function hasSurveySatisfied()
    {
        return $this->hasOneof(3);
    }

    /**
     * Details about various factors for being satisfied with the lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurveySatisfied survey_satisfied = 3;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\SurveySatisfied $var
     * @return $this
     */
    public function setSurveySatisfied($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\SurveySatisfied::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Details about various factors for not being satisfied with the lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurveyDissatisfied survey_dissatisfied = 4;</code>
     *
     * @return \Google\Ads\GoogleAds\V23\Services\SurveyDissatisfied|null
     */
    public function getSurveyDissatisfied()
    {
        return $this->readOneof(4);
    }

    public function hasSurveyDissatisfied()
    {
        return $this->hasOneof(4);
    }

    /**
     * Details about various factors for not being satisfied with the lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.services.SurveyDissatisfied survey_dissatisfied = 4;</code>
     *
     * @param  \Google\Ads\GoogleAds\V23\Services\SurveyDissatisfied $var
     * @return $this
     */
    public function setSurveyDissatisfied($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Services\SurveyDissatisfied::class);
        $this->writeOneof(4, $var);

        return $this;
    }

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

}

