<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/web_property.proto

namespace Google\Ads\AdManager\V1;

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

/**
 * Represents a web property.
 *
 * Generated from protobuf message <code>google.ads.admanager.v1.WebProperty</code>
 */
class WebProperty extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The resource name of the WebProperty.
     * Format:
     * `networks/{network_code}/webProperties/{web_property_code}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Required. The `WebProperty` code.
     *
     * Generated from protobuf field <code>string web_property_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $web_property_code = '';
    /**
     * Required. The ExchangeSyndicationProduct associated with this WebProperty.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $product_type = 0;
    /**
     * Optional. The `WebProperty` ID.
     *
     * Generated from protobuf field <code>int64 web_property_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $web_property_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The resource name of the WebProperty.
     *           Format:
     *           `networks/{network_code}/webProperties/{web_property_code}`
     *     @type string $web_property_code
     *           Required. The `WebProperty` code.
     *     @type int $product_type
     *           Required. The ExchangeSyndicationProduct associated with this WebProperty.
     *     @type int|string $web_property_id
     *           Optional. The `WebProperty` ID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Admanager\V1\WebProperty::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The resource name of the WebProperty.
     * Format:
     * `networks/{network_code}/webProperties/{web_property_code}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The resource name of the WebProperty.
     * Format:
     * `networks/{network_code}/webProperties/{web_property_code}`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The `WebProperty` code.
     *
     * Generated from protobuf field <code>string web_property_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getWebPropertyCode()
    {
        return $this->web_property_code;
    }

    /**
     * Required. The `WebProperty` code.
     *
     * Generated from protobuf field <code>string web_property_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setWebPropertyCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->web_property_code = $var;

        return $this;
    }

    /**
     * Required. The ExchangeSyndicationProduct associated with this WebProperty.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getProductType()
    {
        return $this->product_type;
    }

    /**
     * Required. The ExchangeSyndicationProduct associated with this WebProperty.
     *
     * Generated from protobuf field <code>.google.ads.admanager.v1.ExchangeSyndicationProductEnum.ExchangeSyndicationProduct product_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setProductType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ExchangeSyndicationProductEnum\ExchangeSyndicationProduct::class);
        $this->product_type = $var;

        return $this;
    }

    /**
     * Optional. The `WebProperty` ID.
     *
     * Generated from protobuf field <code>int64 web_property_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getWebPropertyId()
    {
        return $this->web_property_id;
    }

    /**
     * Optional. The `WebProperty` ID.
     *
     * Generated from protobuf field <code>int64 web_property_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setWebPropertyId($var)
    {
        GPBUtil::checkInt64($var);
        $this->web_property_id = $var;

        return $this;
    }

}

