<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/shopping/merchant/reports/v1beta/reports.proto

namespace Google\Shopping\Merchant\Reports\V1beta;

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

/**
 * Fields available for query in `product_performance_view` table.
 * Product performance data for your account, including performance metrics (for
 * example, `clicks`) and dimensions according to which performance metrics are
 * segmented (for example, `offer_id`). Values of product dimensions, such as
 * `offer_id`, reflect the state of a product at the time of the impression.
 * Segment fields cannot be selected in queries without also selecting at least
 * one metric field.
 * Values are only set for fields requested explicitly in the request's search
 * query.
 *
 * Generated from protobuf message <code>google.shopping.merchant.reports.v1beta.ProductPerformanceView</code>
 */
class ProductPerformanceView extends \Google\Protobuf\Internal\Message
{
    /**
     * Marketing method to which metrics apply. Segment.
     *
     * Generated from protobuf field <code>optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1;</code>
     */
    protected $marketing_method = null;
    /**
     * Date in the merchant timezone to which metrics apply. Segment.
     * Condition on `date` is required in the `WHERE` clause.
     *
     * Generated from protobuf field <code>.google.type.Date date = 2;</code>
     */
    protected $date = null;
    /**
     * First day of the week (Monday) of the metrics date in the merchant
     * timezone. Segment.
     *
     * Generated from protobuf field <code>.google.type.Date week = 3;</code>
     */
    protected $week = null;
    /**
     * Code of the country where the customer is located at the time of the event.
     * Represented in the ISO 3166 format. Segment.
     * If the customer country cannot be determined, a special 'ZZ' code is
     * returned.
     *
     * Generated from protobuf field <code>optional string customer_country_code = 4;</code>
     */
    protected $customer_country_code = null;
    /**
     * Merchant-provided id of the product. Segment.
     *
     * Generated from protobuf field <code>optional string offer_id = 5;</code>
     */
    protected $offer_id = null;
    /**
     * Title of the product. Segment.
     *
     * Generated from protobuf field <code>optional string title = 6;</code>
     */
    protected $title = null;
    /**
     * Brand of the product. Segment.
     *
     * Generated from protobuf field <code>optional string brand = 7;</code>
     */
    protected $brand = null;
    /**
     * [Product category (1st
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l1 = 8;</code>
     */
    protected $category_l1 = null;
    /**
     * [Product category (2nd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l2 = 9;</code>
     */
    protected $category_l2 = null;
    /**
     * [Product category (3rd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l3 = 10;</code>
     */
    protected $category_l3 = null;
    /**
     * [Product category (4th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l4 = 11;</code>
     */
    protected $category_l4 = null;
    /**
     * [Product category (5th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l5 = 12;</code>
     */
    protected $category_l5 = null;
    /**
     * [Product type (1st
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l1 = 13;</code>
     */
    protected $product_type_l1 = null;
    /**
     * [Product type (2nd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l2 = 14;</code>
     */
    protected $product_type_l2 = null;
    /**
     * [Product type (3rd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l3 = 15;</code>
     */
    protected $product_type_l3 = null;
    /**
     * [Product type (4th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l4 = 16;</code>
     */
    protected $product_type_l4 = null;
    /**
     * [Product type (5th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l5 = 17;</code>
     */
    protected $product_type_l5 = null;
    /**
     * Custom label 0 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label0 = 18;</code>
     */
    protected $custom_label0 = null;
    /**
     * Custom label 1 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label1 = 19;</code>
     */
    protected $custom_label1 = null;
    /**
     * Custom label 2 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label2 = 20;</code>
     */
    protected $custom_label2 = null;
    /**
     * Custom label 3 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label3 = 21;</code>
     */
    protected $custom_label3 = null;
    /**
     * Custom label 4 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label4 = 22;</code>
     */
    protected $custom_label4 = null;
    /**
     * Number of clicks. Metric.
     *
     * Generated from protobuf field <code>optional int64 clicks = 23;</code>
     */
    protected $clicks = null;
    /**
     * Number of times merchant's products are shown. Metric.
     *
     * Generated from protobuf field <code>optional int64 impressions = 24;</code>
     */
    protected $impressions = null;
    /**
     * Click-through rate - the number of clicks merchant's products receive
     * (clicks) divided by the number of times the products are shown
     * (impressions). Metric.
     *
     * Generated from protobuf field <code>optional double click_through_rate = 25;</code>
     */
    protected $click_through_rate = null;
    /**
     * Number of conversions attributed to the product, reported on the conversion
     * date. Depending on the attribution model, a conversion might be distributed
     * across multiple clicks, where each click gets its own credit assigned. This
     * metric is a sum of all such credits. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>optional double conversions = 26;</code>
     */
    protected $conversions = null;
    /**
     * Value of conversions attributed to the product, reported on the conversion
     * date. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>.google.shopping.type.Price conversion_value = 27;</code>
     */
    protected $conversion_value = null;
    /**
     * Number of conversions divided by the number of clicks, reported on the
     * impression date. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>optional double conversion_rate = 28;</code>
     */
    protected $conversion_rate = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $marketing_method
     *           Marketing method to which metrics apply. Segment.
     *     @type \Google\Type\Date $date
     *           Date in the merchant timezone to which metrics apply. Segment.
     *           Condition on `date` is required in the `WHERE` clause.
     *     @type \Google\Type\Date $week
     *           First day of the week (Monday) of the metrics date in the merchant
     *           timezone. Segment.
     *     @type string $customer_country_code
     *           Code of the country where the customer is located at the time of the event.
     *           Represented in the ISO 3166 format. Segment.
     *           If the customer country cannot be determined, a special 'ZZ' code is
     *           returned.
     *     @type string $offer_id
     *           Merchant-provided id of the product. Segment.
     *     @type string $title
     *           Title of the product. Segment.
     *     @type string $brand
     *           Brand of the product. Segment.
     *     @type string $category_l1
     *           [Product category (1st
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in Google's product taxonomy. Segment.
     *     @type string $category_l2
     *           [Product category (2nd
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in Google's product taxonomy. Segment.
     *     @type string $category_l3
     *           [Product category (3rd
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in Google's product taxonomy. Segment.
     *     @type string $category_l4
     *           [Product category (4th
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in Google's product taxonomy. Segment.
     *     @type string $category_l5
     *           [Product category (5th
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in Google's product taxonomy. Segment.
     *     @type string $product_type_l1
     *           [Product type (1st
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in merchant's own product taxonomy. Segment.
     *     @type string $product_type_l2
     *           [Product type (2nd
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in merchant's own product taxonomy. Segment.
     *     @type string $product_type_l3
     *           [Product type (3rd
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in merchant's own product taxonomy. Segment.
     *     @type string $product_type_l4
     *           [Product type (4th
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in merchant's own product taxonomy. Segment.
     *     @type string $product_type_l5
     *           [Product type (5th
     *           level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     *           in merchant's own product taxonomy. Segment.
     *     @type string $custom_label0
     *           Custom label 0 for custom grouping of products. Segment.
     *     @type string $custom_label1
     *           Custom label 1 for custom grouping of products. Segment.
     *     @type string $custom_label2
     *           Custom label 2 for custom grouping of products. Segment.
     *     @type string $custom_label3
     *           Custom label 3 for custom grouping of products. Segment.
     *     @type string $custom_label4
     *           Custom label 4 for custom grouping of products. Segment.
     *     @type int|string $clicks
     *           Number of clicks. Metric.
     *     @type int|string $impressions
     *           Number of times merchant's products are shown. Metric.
     *     @type float $click_through_rate
     *           Click-through rate - the number of clicks merchant's products receive
     *           (clicks) divided by the number of times the products are shown
     *           (impressions). Metric.
     *     @type float $conversions
     *           Number of conversions attributed to the product, reported on the conversion
     *           date. Depending on the attribution model, a conversion might be distributed
     *           across multiple clicks, where each click gets its own credit assigned. This
     *           metric is a sum of all such credits. Metric.
     *           Available only for the `FREE` traffic source.
     *     @type \Google\Shopping\Type\Price $conversion_value
     *           Value of conversions attributed to the product, reported on the conversion
     *           date. Metric.
     *           Available only for the `FREE` traffic source.
     *     @type float $conversion_rate
     *           Number of conversions divided by the number of clicks, reported on the
     *           impression date. Metric.
     *           Available only for the `FREE` traffic source.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Reports\V1Beta\Reports::initOnce();
        parent::__construct($data);
    }

    /**
     * Marketing method to which metrics apply. Segment.
     *
     * Generated from protobuf field <code>optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1;</code>
     * @return int
     */
    public function getMarketingMethod()
    {
        return isset($this->marketing_method) ? $this->marketing_method : 0;
    }

    public function hasMarketingMethod()
    {
        return isset($this->marketing_method);
    }

    public function clearMarketingMethod()
    {
        unset($this->marketing_method);
    }

    /**
     * Marketing method to which metrics apply. Segment.
     *
     * Generated from protobuf field <code>optional .google.shopping.merchant.reports.v1beta.MarketingMethod.MarketingMethodEnum marketing_method = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMarketingMethod($var)
    {
        GPBUtil::checkEnum($var, \Google\Shopping\Merchant\Reports\V1beta\MarketingMethod\MarketingMethodEnum::class);
        $this->marketing_method = $var;

        return $this;
    }

    /**
     * Date in the merchant timezone to which metrics apply. Segment.
     * Condition on `date` is required in the `WHERE` clause.
     *
     * Generated from protobuf field <code>.google.type.Date date = 2;</code>
     * @return \Google\Type\Date|null
     */
    public function getDate()
    {
        return $this->date;
    }

    public function hasDate()
    {
        return isset($this->date);
    }

    public function clearDate()
    {
        unset($this->date);
    }

    /**
     * Date in the merchant timezone to which metrics apply. Segment.
     * Condition on `date` is required in the `WHERE` clause.
     *
     * Generated from protobuf field <code>.google.type.Date date = 2;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->date = $var;

        return $this;
    }

    /**
     * First day of the week (Monday) of the metrics date in the merchant
     * timezone. Segment.
     *
     * Generated from protobuf field <code>.google.type.Date week = 3;</code>
     * @return \Google\Type\Date|null
     */
    public function getWeek()
    {
        return $this->week;
    }

    public function hasWeek()
    {
        return isset($this->week);
    }

    public function clearWeek()
    {
        unset($this->week);
    }

    /**
     * First day of the week (Monday) of the metrics date in the merchant
     * timezone. Segment.
     *
     * Generated from protobuf field <code>.google.type.Date week = 3;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setWeek($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->week = $var;

        return $this;
    }

    /**
     * Code of the country where the customer is located at the time of the event.
     * Represented in the ISO 3166 format. Segment.
     * If the customer country cannot be determined, a special 'ZZ' code is
     * returned.
     *
     * Generated from protobuf field <code>optional string customer_country_code = 4;</code>
     * @return string
     */
    public function getCustomerCountryCode()
    {
        return isset($this->customer_country_code) ? $this->customer_country_code : '';
    }

    public function hasCustomerCountryCode()
    {
        return isset($this->customer_country_code);
    }

    public function clearCustomerCountryCode()
    {
        unset($this->customer_country_code);
    }

    /**
     * Code of the country where the customer is located at the time of the event.
     * Represented in the ISO 3166 format. Segment.
     * If the customer country cannot be determined, a special 'ZZ' code is
     * returned.
     *
     * Generated from protobuf field <code>optional string customer_country_code = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomerCountryCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->customer_country_code = $var;

        return $this;
    }

    /**
     * Merchant-provided id of the product. Segment.
     *
     * Generated from protobuf field <code>optional string offer_id = 5;</code>
     * @return string
     */
    public function getOfferId()
    {
        return isset($this->offer_id) ? $this->offer_id : '';
    }

    public function hasOfferId()
    {
        return isset($this->offer_id);
    }

    public function clearOfferId()
    {
        unset($this->offer_id);
    }

    /**
     * Merchant-provided id of the product. Segment.
     *
     * Generated from protobuf field <code>optional string offer_id = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setOfferId($var)
    {
        GPBUtil::checkString($var, True);
        $this->offer_id = $var;

        return $this;
    }

    /**
     * Title of the product. Segment.
     *
     * Generated from protobuf field <code>optional string title = 6;</code>
     * @return string
     */
    public function getTitle()
    {
        return isset($this->title) ? $this->title : '';
    }

    public function hasTitle()
    {
        return isset($this->title);
    }

    public function clearTitle()
    {
        unset($this->title);
    }

    /**
     * Title of the product. Segment.
     *
     * Generated from protobuf field <code>optional string title = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Brand of the product. Segment.
     *
     * Generated from protobuf field <code>optional string brand = 7;</code>
     * @return string
     */
    public function getBrand()
    {
        return isset($this->brand) ? $this->brand : '';
    }

    public function hasBrand()
    {
        return isset($this->brand);
    }

    public function clearBrand()
    {
        unset($this->brand);
    }

    /**
     * Brand of the product. Segment.
     *
     * Generated from protobuf field <code>optional string brand = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setBrand($var)
    {
        GPBUtil::checkString($var, True);
        $this->brand = $var;

        return $this;
    }

    /**
     * [Product category (1st
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l1 = 8;</code>
     * @return string
     */
    public function getCategoryL1()
    {
        return isset($this->category_l1) ? $this->category_l1 : '';
    }

    public function hasCategoryL1()
    {
        return isset($this->category_l1);
    }

    public function clearCategoryL1()
    {
        unset($this->category_l1);
    }

    /**
     * [Product category (1st
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l1 = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryL1($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_l1 = $var;

        return $this;
    }

    /**
     * [Product category (2nd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l2 = 9;</code>
     * @return string
     */
    public function getCategoryL2()
    {
        return isset($this->category_l2) ? $this->category_l2 : '';
    }

    public function hasCategoryL2()
    {
        return isset($this->category_l2);
    }

    public function clearCategoryL2()
    {
        unset($this->category_l2);
    }

    /**
     * [Product category (2nd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l2 = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryL2($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_l2 = $var;

        return $this;
    }

    /**
     * [Product category (3rd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l3 = 10;</code>
     * @return string
     */
    public function getCategoryL3()
    {
        return isset($this->category_l3) ? $this->category_l3 : '';
    }

    public function hasCategoryL3()
    {
        return isset($this->category_l3);
    }

    public function clearCategoryL3()
    {
        unset($this->category_l3);
    }

    /**
     * [Product category (3rd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l3 = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryL3($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_l3 = $var;

        return $this;
    }

    /**
     * [Product category (4th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l4 = 11;</code>
     * @return string
     */
    public function getCategoryL4()
    {
        return isset($this->category_l4) ? $this->category_l4 : '';
    }

    public function hasCategoryL4()
    {
        return isset($this->category_l4);
    }

    public function clearCategoryL4()
    {
        unset($this->category_l4);
    }

    /**
     * [Product category (4th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l4 = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryL4($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_l4 = $var;

        return $this;
    }

    /**
     * [Product category (5th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l5 = 12;</code>
     * @return string
     */
    public function getCategoryL5()
    {
        return isset($this->category_l5) ? $this->category_l5 : '';
    }

    public function hasCategoryL5()
    {
        return isset($this->category_l5);
    }

    public function clearCategoryL5()
    {
        unset($this->category_l5);
    }

    /**
     * [Product category (5th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in Google's product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string category_l5 = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryL5($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_l5 = $var;

        return $this;
    }

    /**
     * [Product type (1st
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l1 = 13;</code>
     * @return string
     */
    public function getProductTypeL1()
    {
        return isset($this->product_type_l1) ? $this->product_type_l1 : '';
    }

    public function hasProductTypeL1()
    {
        return isset($this->product_type_l1);
    }

    public function clearProductTypeL1()
    {
        unset($this->product_type_l1);
    }

    /**
     * [Product type (1st
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l1 = 13;</code>
     * @param string $var
     * @return $this
     */
    public function setProductTypeL1($var)
    {
        GPBUtil::checkString($var, True);
        $this->product_type_l1 = $var;

        return $this;
    }

    /**
     * [Product type (2nd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l2 = 14;</code>
     * @return string
     */
    public function getProductTypeL2()
    {
        return isset($this->product_type_l2) ? $this->product_type_l2 : '';
    }

    public function hasProductTypeL2()
    {
        return isset($this->product_type_l2);
    }

    public function clearProductTypeL2()
    {
        unset($this->product_type_l2);
    }

    /**
     * [Product type (2nd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l2 = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setProductTypeL2($var)
    {
        GPBUtil::checkString($var, True);
        $this->product_type_l2 = $var;

        return $this;
    }

    /**
     * [Product type (3rd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l3 = 15;</code>
     * @return string
     */
    public function getProductTypeL3()
    {
        return isset($this->product_type_l3) ? $this->product_type_l3 : '';
    }

    public function hasProductTypeL3()
    {
        return isset($this->product_type_l3);
    }

    public function clearProductTypeL3()
    {
        unset($this->product_type_l3);
    }

    /**
     * [Product type (3rd
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l3 = 15;</code>
     * @param string $var
     * @return $this
     */
    public function setProductTypeL3($var)
    {
        GPBUtil::checkString($var, True);
        $this->product_type_l3 = $var;

        return $this;
    }

    /**
     * [Product type (4th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l4 = 16;</code>
     * @return string
     */
    public function getProductTypeL4()
    {
        return isset($this->product_type_l4) ? $this->product_type_l4 : '';
    }

    public function hasProductTypeL4()
    {
        return isset($this->product_type_l4);
    }

    public function clearProductTypeL4()
    {
        unset($this->product_type_l4);
    }

    /**
     * [Product type (4th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l4 = 16;</code>
     * @param string $var
     * @return $this
     */
    public function setProductTypeL4($var)
    {
        GPBUtil::checkString($var, True);
        $this->product_type_l4 = $var;

        return $this;
    }

    /**
     * [Product type (5th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l5 = 17;</code>
     * @return string
     */
    public function getProductTypeL5()
    {
        return isset($this->product_type_l5) ? $this->product_type_l5 : '';
    }

    public function hasProductTypeL5()
    {
        return isset($this->product_type_l5);
    }

    public function clearProductTypeL5()
    {
        unset($this->product_type_l5);
    }

    /**
     * [Product type (5th
     * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type)
     * in merchant's own product taxonomy. Segment.
     *
     * Generated from protobuf field <code>optional string product_type_l5 = 17;</code>
     * @param string $var
     * @return $this
     */
    public function setProductTypeL5($var)
    {
        GPBUtil::checkString($var, True);
        $this->product_type_l5 = $var;

        return $this;
    }

    /**
     * Custom label 0 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label0 = 18;</code>
     * @return string
     */
    public function getCustomLabel0()
    {
        return isset($this->custom_label0) ? $this->custom_label0 : '';
    }

    public function hasCustomLabel0()
    {
        return isset($this->custom_label0);
    }

    public function clearCustomLabel0()
    {
        unset($this->custom_label0);
    }

    /**
     * Custom label 0 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label0 = 18;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomLabel0($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_label0 = $var;

        return $this;
    }

    /**
     * Custom label 1 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label1 = 19;</code>
     * @return string
     */
    public function getCustomLabel1()
    {
        return isset($this->custom_label1) ? $this->custom_label1 : '';
    }

    public function hasCustomLabel1()
    {
        return isset($this->custom_label1);
    }

    public function clearCustomLabel1()
    {
        unset($this->custom_label1);
    }

    /**
     * Custom label 1 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label1 = 19;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomLabel1($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_label1 = $var;

        return $this;
    }

    /**
     * Custom label 2 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label2 = 20;</code>
     * @return string
     */
    public function getCustomLabel2()
    {
        return isset($this->custom_label2) ? $this->custom_label2 : '';
    }

    public function hasCustomLabel2()
    {
        return isset($this->custom_label2);
    }

    public function clearCustomLabel2()
    {
        unset($this->custom_label2);
    }

    /**
     * Custom label 2 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label2 = 20;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomLabel2($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_label2 = $var;

        return $this;
    }

    /**
     * Custom label 3 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label3 = 21;</code>
     * @return string
     */
    public function getCustomLabel3()
    {
        return isset($this->custom_label3) ? $this->custom_label3 : '';
    }

    public function hasCustomLabel3()
    {
        return isset($this->custom_label3);
    }

    public function clearCustomLabel3()
    {
        unset($this->custom_label3);
    }

    /**
     * Custom label 3 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label3 = 21;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomLabel3($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_label3 = $var;

        return $this;
    }

    /**
     * Custom label 4 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label4 = 22;</code>
     * @return string
     */
    public function getCustomLabel4()
    {
        return isset($this->custom_label4) ? $this->custom_label4 : '';
    }

    public function hasCustomLabel4()
    {
        return isset($this->custom_label4);
    }

    public function clearCustomLabel4()
    {
        unset($this->custom_label4);
    }

    /**
     * Custom label 4 for custom grouping of products. Segment.
     *
     * Generated from protobuf field <code>optional string custom_label4 = 22;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomLabel4($var)
    {
        GPBUtil::checkString($var, True);
        $this->custom_label4 = $var;

        return $this;
    }

    /**
     * Number of clicks. Metric.
     *
     * Generated from protobuf field <code>optional int64 clicks = 23;</code>
     * @return int|string
     */
    public function getClicks()
    {
        return isset($this->clicks) ? $this->clicks : 0;
    }

    public function hasClicks()
    {
        return isset($this->clicks);
    }

    public function clearClicks()
    {
        unset($this->clicks);
    }

    /**
     * Number of clicks. Metric.
     *
     * Generated from protobuf field <code>optional int64 clicks = 23;</code>
     * @param int|string $var
     * @return $this
     */
    public function setClicks($var)
    {
        GPBUtil::checkInt64($var);
        $this->clicks = $var;

        return $this;
    }

    /**
     * Number of times merchant's products are shown. Metric.
     *
     * Generated from protobuf field <code>optional int64 impressions = 24;</code>
     * @return int|string
     */
    public function getImpressions()
    {
        return isset($this->impressions) ? $this->impressions : 0;
    }

    public function hasImpressions()
    {
        return isset($this->impressions);
    }

    public function clearImpressions()
    {
        unset($this->impressions);
    }

    /**
     * Number of times merchant's products are shown. Metric.
     *
     * Generated from protobuf field <code>optional int64 impressions = 24;</code>
     * @param int|string $var
     * @return $this
     */
    public function setImpressions($var)
    {
        GPBUtil::checkInt64($var);
        $this->impressions = $var;

        return $this;
    }

    /**
     * Click-through rate - the number of clicks merchant's products receive
     * (clicks) divided by the number of times the products are shown
     * (impressions). Metric.
     *
     * Generated from protobuf field <code>optional double click_through_rate = 25;</code>
     * @return float
     */
    public function getClickThroughRate()
    {
        return isset($this->click_through_rate) ? $this->click_through_rate : 0.0;
    }

    public function hasClickThroughRate()
    {
        return isset($this->click_through_rate);
    }

    public function clearClickThroughRate()
    {
        unset($this->click_through_rate);
    }

    /**
     * Click-through rate - the number of clicks merchant's products receive
     * (clicks) divided by the number of times the products are shown
     * (impressions). Metric.
     *
     * Generated from protobuf field <code>optional double click_through_rate = 25;</code>
     * @param float $var
     * @return $this
     */
    public function setClickThroughRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->click_through_rate = $var;

        return $this;
    }

    /**
     * Number of conversions attributed to the product, reported on the conversion
     * date. Depending on the attribution model, a conversion might be distributed
     * across multiple clicks, where each click gets its own credit assigned. This
     * metric is a sum of all such credits. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>optional double conversions = 26;</code>
     * @return float
     */
    public function getConversions()
    {
        return isset($this->conversions) ? $this->conversions : 0.0;
    }

    public function hasConversions()
    {
        return isset($this->conversions);
    }

    public function clearConversions()
    {
        unset($this->conversions);
    }

    /**
     * Number of conversions attributed to the product, reported on the conversion
     * date. Depending on the attribution model, a conversion might be distributed
     * across multiple clicks, where each click gets its own credit assigned. This
     * metric is a sum of all such credits. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>optional double conversions = 26;</code>
     * @param float $var
     * @return $this
     */
    public function setConversions($var)
    {
        GPBUtil::checkDouble($var);
        $this->conversions = $var;

        return $this;
    }

    /**
     * Value of conversions attributed to the product, reported on the conversion
     * date. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>.google.shopping.type.Price conversion_value = 27;</code>
     * @return \Google\Shopping\Type\Price|null
     */
    public function getConversionValue()
    {
        return $this->conversion_value;
    }

    public function hasConversionValue()
    {
        return isset($this->conversion_value);
    }

    public function clearConversionValue()
    {
        unset($this->conversion_value);
    }

    /**
     * Value of conversions attributed to the product, reported on the conversion
     * date. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>.google.shopping.type.Price conversion_value = 27;</code>
     * @param \Google\Shopping\Type\Price $var
     * @return $this
     */
    public function setConversionValue($var)
    {
        GPBUtil::checkMessage($var, \Google\Shopping\Type\Price::class);
        $this->conversion_value = $var;

        return $this;
    }

    /**
     * Number of conversions divided by the number of clicks, reported on the
     * impression date. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>optional double conversion_rate = 28;</code>
     * @return float
     */
    public function getConversionRate()
    {
        return isset($this->conversion_rate) ? $this->conversion_rate : 0.0;
    }

    public function hasConversionRate()
    {
        return isset($this->conversion_rate);
    }

    public function clearConversionRate()
    {
        unset($this->conversion_rate);
    }

    /**
     * Number of conversions divided by the number of clicks, reported on the
     * impression date. Metric.
     * Available only for the `FREE` traffic source.
     *
     * Generated from protobuf field <code>optional double conversion_rate = 28;</code>
     * @param float $var
     * @return $this
     */
    public function setConversionRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->conversion_rate = $var;

        return $this;
    }

}

