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

namespace Google\Ads\GoogleAds\V22\Resources;

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

/**
 * Data from Local Services Lead.
 * Contains details of Lead which is generated when user calls, messages or
 * books service from advertiser.
 * More info: https://ads.google.com/local-services-ads
 *
 * Generated from protobuf message <code>google.ads.googleads.v22.resources.LocalServicesLead</code>
 */
class LocalServicesLead extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The resource name of the local services lead data.
     * Local Services Lead resource name have the form
     * `customers/{customer_id}/localServicesLead/{local_services_lead_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     */
    protected $resource_name = '';
    /**
     * Output only. ID of this Lead.
     *
     * Generated from protobuf field <code>int64 id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $id = 0;
    /**
     * Output only. Service category of the lead. For example:
     * `xcat:service_area_business_hvac`,
     * `xcat:service_area_business_real_estate_agent`, etc.
     * For more details see:
     * https://developers.google.com/google-ads/api/data/codes-formats#local_services_ids
     *
     * Generated from protobuf field <code>string category_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $category_id = '';
    /**
     * Output only. Service for the  category. For example: `buyer_agent`,
     * `seller_agent` for the category of
     * `xcat:service_area_business_real_estate_agent`.
     *
     * Generated from protobuf field <code>string service_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $service_id = '';
    /**
     * Output only. Lead's contact details.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.resources.ContactDetails contact_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $contact_details = null;
    /**
     * Output only. Type of Local Services lead: phone, message, booking, etc.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.LocalServicesLeadTypeEnum.LeadType lead_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $lead_type = 0;
    /**
     * Output only. Current status of lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.LocalServicesLeadStatusEnum.LeadStatus lead_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $lead_status = 0;
    /**
     * Output only. The date time at which lead was created by Local Services Ads.
     * The format is "YYYY-MM-DD HH:MM:SS" in the Google Ads account's timezone.
     * Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
     *
     * Generated from protobuf field <code>string creation_date_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $creation_date_time = '';
    /**
     * Output only. Language used by the Local Services provider linked to lead.
     * See https://developers.google.com/google-ads/api/data/codes-formats#locales
     *
     * Generated from protobuf field <code>string locale = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $locale = '';
    /**
     * Output only. Note added by advertiser for the lead.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.resources.Note note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $note = null;
    /**
     * Output only. True if the advertiser was charged for the lead.
     *
     * Generated from protobuf field <code>bool lead_charged = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $lead_charged = false;
    /**
     * Output only. Credit details of the lead.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.resources.CreditDetails credit_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $credit_details = null;
    /**
     * Output only. True if the advertiser submitted feedback for the lead.
     *
     * Generated from protobuf field <code>bool lead_feedback_submitted = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $lead_feedback_submitted = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Output only. The resource name of the local services lead data.
     *           Local Services Lead resource name have the form
     *           `customers/{customer_id}/localServicesLead/{local_services_lead_id}`
     *     @type int|string $id
     *           Output only. ID of this Lead.
     *     @type string $category_id
     *           Output only. Service category of the lead. For example:
     *           `xcat:service_area_business_hvac`,
     *           `xcat:service_area_business_real_estate_agent`, etc.
     *           For more details see:
     *           https://developers.google.com/google-ads/api/data/codes-formats#local_services_ids
     *     @type string $service_id
     *           Output only. Service for the  category. For example: `buyer_agent`,
     *           `seller_agent` for the category of
     *           `xcat:service_area_business_real_estate_agent`.
     *     @type \Google\Ads\GoogleAds\V22\Resources\ContactDetails $contact_details
     *           Output only. Lead's contact details.
     *     @type int $lead_type
     *           Output only. Type of Local Services lead: phone, message, booking, etc.
     *     @type int $lead_status
     *           Output only. Current status of lead.
     *     @type string $creation_date_time
     *           Output only. The date time at which lead was created by Local Services Ads.
     *           The format is "YYYY-MM-DD HH:MM:SS" in the Google Ads account's timezone.
     *           Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
     *     @type string $locale
     *           Output only. Language used by the Local Services provider linked to lead.
     *           See https://developers.google.com/google-ads/api/data/codes-formats#locales
     *     @type \Google\Ads\GoogleAds\V22\Resources\Note $note
     *           Output only. Note added by advertiser for the lead.
     *     @type bool $lead_charged
     *           Output only. True if the advertiser was charged for the lead.
     *     @type \Google\Ads\GoogleAds\V22\Resources\CreditDetails $credit_details
     *           Output only. Credit details of the lead.
     *     @type bool $lead_feedback_submitted
     *           Output only. True if the advertiser submitted feedback for the lead.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V22\Resources\LocalServicesLead::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The resource name of the local services lead data.
     * Local Services Lead resource name have the form
     * `customers/{customer_id}/localServicesLead/{local_services_lead_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Output only. The resource name of the local services lead data.
     * Local Services Lead resource name have the form
     * `customers/{customer_id}/localServicesLead/{local_services_lead_id}`
     *
     * Generated from protobuf field <code>string resource_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Output only. ID of this Lead.
     *
     * Generated from protobuf field <code>int64 id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Output only. ID of this Lead.
     *
     * Generated from protobuf field <code>int64 id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt64($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Output only. Service category of the lead. For example:
     * `xcat:service_area_business_hvac`,
     * `xcat:service_area_business_real_estate_agent`, etc.
     * For more details see:
     * https://developers.google.com/google-ads/api/data/codes-formats#local_services_ids
     *
     * Generated from protobuf field <code>string category_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getCategoryId()
    {
        return $this->category_id;
    }

    /**
     * Output only. Service category of the lead. For example:
     * `xcat:service_area_business_hvac`,
     * `xcat:service_area_business_real_estate_agent`, etc.
     * For more details see:
     * https://developers.google.com/google-ads/api/data/codes-formats#local_services_ids
     *
     * Generated from protobuf field <code>string category_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryId($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_id = $var;

        return $this;
    }

    /**
     * Output only. Service for the  category. For example: `buyer_agent`,
     * `seller_agent` for the category of
     * `xcat:service_area_business_real_estate_agent`.
     *
     * Generated from protobuf field <code>string service_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getServiceId()
    {
        return $this->service_id;
    }

    /**
     * Output only. Service for the  category. For example: `buyer_agent`,
     * `seller_agent` for the category of
     * `xcat:service_area_business_real_estate_agent`.
     *
     * Generated from protobuf field <code>string service_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setServiceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_id = $var;

        return $this;
    }

    /**
     * Output only. Lead's contact details.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.resources.ContactDetails contact_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Ads\GoogleAds\V22\Resources\ContactDetails|null
     */
    public function getContactDetails()
    {
        return $this->contact_details;
    }

    public function hasContactDetails()
    {
        return isset($this->contact_details);
    }

    public function clearContactDetails()
    {
        unset($this->contact_details);
    }

    /**
     * Output only. Lead's contact details.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.resources.ContactDetails contact_details = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\GoogleAds\V22\Resources\ContactDetails $var
     * @return $this
     */
    public function setContactDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V22\Resources\ContactDetails::class);
        $this->contact_details = $var;

        return $this;
    }

    /**
     * Output only. Type of Local Services lead: phone, message, booking, etc.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.LocalServicesLeadTypeEnum.LeadType lead_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getLeadType()
    {
        return $this->lead_type;
    }

    /**
     * Output only. Type of Local Services lead: phone, message, booking, etc.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.LocalServicesLeadTypeEnum.LeadType lead_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setLeadType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V22\Enums\LocalServicesLeadTypeEnum\LeadType::class);
        $this->lead_type = $var;

        return $this;
    }

    /**
     * Output only. Current status of lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.LocalServicesLeadStatusEnum.LeadStatus lead_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getLeadStatus()
    {
        return $this->lead_status;
    }

    /**
     * Output only. Current status of lead.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v22.enums.LocalServicesLeadStatusEnum.LeadStatus lead_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setLeadStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V22\Enums\LocalServicesLeadStatusEnum\LeadStatus::class);
        $this->lead_status = $var;

        return $this;
    }

    /**
     * Output only. The date time at which lead was created by Local Services Ads.
     * The format is "YYYY-MM-DD HH:MM:SS" in the Google Ads account's timezone.
     * Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
     *
     * Generated from protobuf field <code>string creation_date_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getCreationDateTime()
    {
        return $this->creation_date_time;
    }

    /**
     * Output only. The date time at which lead was created by Local Services Ads.
     * The format is "YYYY-MM-DD HH:MM:SS" in the Google Ads account's timezone.
     * Examples: "2018-03-05 09:15:00" or "2018-02-01 14:34:30"
     *
     * Generated from protobuf field <code>string creation_date_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setCreationDateTime($var)
    {
        GPBUtil::checkString($var, True);
        $this->creation_date_time = $var;

        return $this;
    }

    /**
     * Output only. Language used by the Local Services provider linked to lead.
     * See https://developers.google.com/google-ads/api/data/codes-formats#locales
     *
     * Generated from protobuf field <code>string locale = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getLocale()
    {
        return $this->locale;
    }

    /**
     * Output only. Language used by the Local Services provider linked to lead.
     * See https://developers.google.com/google-ads/api/data/codes-formats#locales
     *
     * Generated from protobuf field <code>string locale = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setLocale($var)
    {
        GPBUtil::checkString($var, True);
        $this->locale = $var;

        return $this;
    }

    /**
     * Output only. Note added by advertiser for the lead.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.resources.Note note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Ads\GoogleAds\V22\Resources\Note|null
     */
    public function getNote()
    {
        return $this->note;
    }

    public function hasNote()
    {
        return isset($this->note);
    }

    public function clearNote()
    {
        unset($this->note);
    }

    /**
     * Output only. Note added by advertiser for the lead.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.resources.Note note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\GoogleAds\V22\Resources\Note $var
     * @return $this
     */
    public function setNote($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V22\Resources\Note::class);
        $this->note = $var;

        return $this;
    }

    /**
     * Output only. True if the advertiser was charged for the lead.
     *
     * Generated from protobuf field <code>bool lead_charged = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getLeadCharged()
    {
        return $this->lead_charged;
    }

    /**
     * Output only. True if the advertiser was charged for the lead.
     *
     * Generated from protobuf field <code>bool lead_charged = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setLeadCharged($var)
    {
        GPBUtil::checkBool($var);
        $this->lead_charged = $var;

        return $this;
    }

    /**
     * Output only. Credit details of the lead.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.resources.CreditDetails credit_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Ads\GoogleAds\V22\Resources\CreditDetails|null
     */
    public function getCreditDetails()
    {
        return $this->credit_details;
    }

    public function hasCreditDetails()
    {
        return isset($this->credit_details);
    }

    public function clearCreditDetails()
    {
        unset($this->credit_details);
    }

    /**
     * Output only. Credit details of the lead.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v22.resources.CreditDetails credit_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Ads\GoogleAds\V22\Resources\CreditDetails $var
     * @return $this
     */
    public function setCreditDetails($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V22\Resources\CreditDetails::class);
        $this->credit_details = $var;

        return $this;
    }

    /**
     * Output only. True if the advertiser submitted feedback for the lead.
     *
     * Generated from protobuf field <code>bool lead_feedback_submitted = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getLeadFeedbackSubmitted()
    {
        return $this->lead_feedback_submitted;
    }

    /**
     * Output only. True if the advertiser submitted feedback for the lead.
     *
     * Generated from protobuf field <code>bool lead_feedback_submitted = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setLeadFeedbackSubmitted($var)
    {
        GPBUtil::checkBool($var);
        $this->lead_feedback_submitted = $var;

        return $this;
    }

}

