<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/photos/library/v1/photos_library.proto

namespace Google\Photos\Library\V1;

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

/**
 * An enrichment containing a map, showing origin and destination locations.
 *
 * Generated from protobuf message <code>google.photos.library.v1.MapEnrichment</code>
 */
class MapEnrichment extends \Google\Protobuf\Internal\Message
{
    /**
     * Origin location for this enrichment item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location origin = 1;</code>
     */
    protected $origin = null;
    /**
     * Destination location for this enrichemt item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location destination = 2;</code>
     */
    protected $destination = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Photos\Library\V1\Location $origin
     *           Origin location for this enrichment item.
     *     @type \Google\Photos\Library\V1\Location $destination
     *           Destination location for this enrichemt item.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
        parent::__construct($data);
    }

    /**
     * Origin location for this enrichment item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location origin = 1;</code>
     * @return \Google\Photos\Library\V1\Location|null
     */
    public function getOrigin()
    {
        return isset($this->origin) ? $this->origin : null;
    }

    public function hasOrigin()
    {
        return isset($this->origin);
    }

    public function clearOrigin()
    {
        unset($this->origin);
    }

    /**
     * Origin location for this enrichment item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location origin = 1;</code>
     * @param \Google\Photos\Library\V1\Location $var
     * @return $this
     */
    public function setOrigin($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\Location::class);
        $this->origin = $var;

        return $this;
    }

    /**
     * Destination location for this enrichemt item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location destination = 2;</code>
     * @return \Google\Photos\Library\V1\Location|null
     */
    public function getDestination()
    {
        return isset($this->destination) ? $this->destination : null;
    }

    public function hasDestination()
    {
        return isset($this->destination);
    }

    public function clearDestination()
    {
        unset($this->destination);
    }

    /**
     * Destination location for this enrichemt item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location destination = 2;</code>
     * @param \Google\Photos\Library\V1\Location $var
     * @return $this
     */
    public function setDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\Location::class);
        $this->destination = $var;

        return $this;
    }

}

