<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/discoveryengine/v1/user_event.proto

namespace Google\Cloud\DiscoveryEngine\V1;

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

/**
 * Detailed page information.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1.PageInfo</code>
 */
class PageInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * A unique ID of a web page view.
     * This should be kept the same for all user events triggered from the same
     * pageview. For example, an item detail page view could trigger multiple
     * events as the user is browsing the page. The `pageview_id` property should
     * be kept the same for all these events so that they can be grouped together
     * properly.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically.
     *
     * Generated from protobuf field <code>string pageview_id = 1;</code>
     */
    protected $pageview_id = '';
    /**
     * The most specific category associated with a category page.
     * To represent full path of category, use '>' sign to separate different
     * hierarchies. If '>' is part of the category name, replace it with
     * other character(s).
     * Category pages include special pages such as sales or promotions. For
     * instance, a special sale page may have the category hierarchy:
     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
     * Required for `view-category-page` events. Other event types should not set
     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
     *
     * Generated from protobuf field <code>string page_category = 2;</code>
     */
    protected $page_category = '';
    /**
     * Complete URL (window.location.href) of the user's current page.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically. Maximum length 5,000
     * characters.
     *
     * Generated from protobuf field <code>string uri = 3;</code>
     */
    protected $uri = '';
    /**
     * The referrer URL of the current page.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically. However, some browser
     * privacy restrictions may cause this field to be empty.
     *
     * Generated from protobuf field <code>string referrer_uri = 4;</code>
     */
    protected $referrer_uri = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $pageview_id
     *           A unique ID of a web page view.
     *           This should be kept the same for all user events triggered from the same
     *           pageview. For example, an item detail page view could trigger multiple
     *           events as the user is browsing the page. The `pageview_id` property should
     *           be kept the same for all these events so that they can be grouped together
     *           properly.
     *           When using the client side event reporting with JavaScript pixel and Google
     *           Tag Manager, this value is filled in automatically.
     *     @type string $page_category
     *           The most specific category associated with a category page.
     *           To represent full path of category, use '>' sign to separate different
     *           hierarchies. If '>' is part of the category name, replace it with
     *           other character(s).
     *           Category pages include special pages such as sales or promotions. For
     *           instance, a special sale page may have the category hierarchy:
     *           `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
     *           Required for `view-category-page` events. Other event types should not set
     *           this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
     *     @type string $uri
     *           Complete URL (window.location.href) of the user's current page.
     *           When using the client side event reporting with JavaScript pixel and Google
     *           Tag Manager, this value is filled in automatically. Maximum length 5,000
     *           characters.
     *     @type string $referrer_uri
     *           The referrer URL of the current page.
     *           When using the client side event reporting with JavaScript pixel and Google
     *           Tag Manager, this value is filled in automatically. However, some browser
     *           privacy restrictions may cause this field to be empty.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1\UserEvent::initOnce();
        parent::__construct($data);
    }

    /**
     * A unique ID of a web page view.
     * This should be kept the same for all user events triggered from the same
     * pageview. For example, an item detail page view could trigger multiple
     * events as the user is browsing the page. The `pageview_id` property should
     * be kept the same for all these events so that they can be grouped together
     * properly.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically.
     *
     * Generated from protobuf field <code>string pageview_id = 1;</code>
     * @return string
     */
    public function getPageviewId()
    {
        return $this->pageview_id;
    }

    /**
     * A unique ID of a web page view.
     * This should be kept the same for all user events triggered from the same
     * pageview. For example, an item detail page view could trigger multiple
     * events as the user is browsing the page. The `pageview_id` property should
     * be kept the same for all these events so that they can be grouped together
     * properly.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically.
     *
     * Generated from protobuf field <code>string pageview_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPageviewId($var)
    {
        GPBUtil::checkString($var, True);
        $this->pageview_id = $var;

        return $this;
    }

    /**
     * The most specific category associated with a category page.
     * To represent full path of category, use '>' sign to separate different
     * hierarchies. If '>' is part of the category name, replace it with
     * other character(s).
     * Category pages include special pages such as sales or promotions. For
     * instance, a special sale page may have the category hierarchy:
     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
     * Required for `view-category-page` events. Other event types should not set
     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
     *
     * Generated from protobuf field <code>string page_category = 2;</code>
     * @return string
     */
    public function getPageCategory()
    {
        return $this->page_category;
    }

    /**
     * The most specific category associated with a category page.
     * To represent full path of category, use '>' sign to separate different
     * hierarchies. If '>' is part of the category name, replace it with
     * other character(s).
     * Category pages include special pages such as sales or promotions. For
     * instance, a special sale page may have the category hierarchy:
     * `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
     * Required for `view-category-page` events. Other event types should not set
     * this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
     *
     * Generated from protobuf field <code>string page_category = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setPageCategory($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_category = $var;

        return $this;
    }

    /**
     * Complete URL (window.location.href) of the user's current page.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically. Maximum length 5,000
     * characters.
     *
     * Generated from protobuf field <code>string uri = 3;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * Complete URL (window.location.href) of the user's current page.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically. Maximum length 5,000
     * characters.
     *
     * Generated from protobuf field <code>string uri = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * The referrer URL of the current page.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically. However, some browser
     * privacy restrictions may cause this field to be empty.
     *
     * Generated from protobuf field <code>string referrer_uri = 4;</code>
     * @return string
     */
    public function getReferrerUri()
    {
        return $this->referrer_uri;
    }

    /**
     * The referrer URL of the current page.
     * When using the client side event reporting with JavaScript pixel and Google
     * Tag Manager, this value is filled in automatically. However, some browser
     * privacy restrictions may cause this field to be empty.
     *
     * Generated from protobuf field <code>string referrer_uri = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setReferrerUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->referrer_uri = $var;

        return $this;
    }

}

