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

namespace Google\Shopping\Merchant\DataSources\V1\PrimaryProductDataSource;

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

/**
 * Destinations also known as [Marketing
 * methods](https://support.google.com/merchants/answer/15130232) selections.
 *
 * Generated from protobuf message <code>google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination</code>
 */
class Destination extends \Google\Protobuf\Internal\Message
{
    /**
     * [Marketing methods](https://support.google.com/merchants/answer/15130232)
     * (also known as destination) selections.
     *
     * Generated from protobuf field <code>.google.shopping.type.Destination.DestinationEnum destination = 1;</code>
     */
    protected $destination = 0;
    /**
     * The state of the destination.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State state = 2;</code>
     */
    protected $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $destination
     *           [Marketing methods](https://support.google.com/merchants/answer/15130232)
     *           (also known as destination) selections.
     *     @type int $state
     *           The state of the destination.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Shopping\Merchant\Datasources\V1\Datasourcetypes::initOnce();
        parent::__construct($data);
    }

    /**
     * [Marketing methods](https://support.google.com/merchants/answer/15130232)
     * (also known as destination) selections.
     *
     * Generated from protobuf field <code>.google.shopping.type.Destination.DestinationEnum destination = 1;</code>
     * @return int
     */
    public function getDestination()
    {
        return $this->destination;
    }

    /**
     * [Marketing methods](https://support.google.com/merchants/answer/15130232)
     * (also known as destination) selections.
     *
     * Generated from protobuf field <code>.google.shopping.type.Destination.DestinationEnum destination = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDestination($var)
    {
        GPBUtil::checkEnum($var, \Google\Shopping\Type\Destination\DestinationEnum::class);
        $this->destination = $var;

        return $this;
    }

    /**
     * The state of the destination.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State state = 2;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * The state of the destination.
     *
     * Generated from protobuf field <code>.google.shopping.merchant.datasources.v1.PrimaryProductDataSource.Destination.State state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Shopping\Merchant\DataSources\V1\PrimaryProductDataSource\Destination\State::class);
        $this->state = $var;

        return $this;
    }

}

