<?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 single location.
 *
 * Generated from protobuf message <code>google.photos.library.v1.LocationEnrichment</code>
 */
class LocationEnrichment extends \Google\Protobuf\Internal\Message
{
    /**
     * Location for this enrichment item.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.Location location = 1;</code>
     */
    protected $location = null;

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

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

    public function hasLocation()
    {
        return isset($this->location);
    }

    public function clearLocation()
    {
        unset($this->location);
    }

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

        return $this;
    }

}

